strip(1) 맨 페이지 - 윈디하나의 솔라나라


맨 페이지 이름


strip(1)                         User Commands                        strip(1)

       strip  - strip symbol table, debugging and line number information from
       an object file

       strip [-lVx] [-c [!]class1,[!]class2,...] file...

       The strip command removes sections from ELF object files.  By  default,
       the  symbol  table  SHT_SYMTAB  and its associated string table, symbol
       sort sections, debugging information, and line  number  information  is

       The default set of candidate sections corresponds to the debug and sym‐
       bol class identifiers to the -c option. The -c, -l, or -x  options  can
       be used to select a different set of candidate sections.

       Once  this  stripping process has been done, limited symbolic debugging
       access is available for that file. Therefore, this command is  normally
       run only on production modules that have been debugged and tested.

       If  strip  is  executed  on  a common archive file (see ar.h(3HEAD)) in
       addition to processing the members, strip removes  the  archive  symbol
       table. The archive symbol table must be restored by executing the ar(1)
       command with the -s option before the archive  can  be  linked  by  the
       ld(1) command.

       strip  is  used to reduce the file storage overhead taken by the object

       The following options are supported:


           Strip a specific  class  of  section.  This  option  provides  fine
           grained control over the sections to be removed.

           The strip class descriptions that follow only apply to non-allocat‐
           able sections.

           Each class token can be prepended with a '!' to indicate  that  the
           class  should  not  be  removed. This definition can be useful when
           combined with the nonalloc  class.  For  example,  using  -c=nonal‐
           loc,!note  removes all non-allocatable sections except for the note

           Stripped sections are completely removed from the output object.

           The following classes of section can be defined.


               Strip any non-allocatable section. These sections  are  identi‐
               fied  as  not  including the SHF_ALLOC section flag. This class
               encapsulates all of the other classes, except  for  the  symbol
               class.  The  nonalloc  class  is  often sufficient by itself to
               remove any unwanted sections.


               Strip any annotation section. These sections  provide  informa‐
               tion  that is used by memory access tools, and coverage related
               tools. These sections are identified by having a SHT_SUNW_ANNO‐
               TATE section type.


               Strip  any  comment  section.  These sections are identified by
               having a .comment section name. Alternatively, the mcs(1) util‐
               ity is commonly used to manipulate comment sections.


               Strip  sections  commonly used to contain debugging data. These
               sections are identified by having a .compcom,  .debug*,  .line,
               .stab*  .SUNW_ctf, or .zdebug* section name. These sections are
               also identified by having a SHT_SUNW_DEBUG or SHT_SUNW_DEBUGSTR
               section type.


               Strip  any excludable section. These sections are identified by
               having a SHF_EXCLUDE section flag. This  class  can  be  useful
               when  manipulating  a relocatable object. By default, such sec‐
               tions are automatically excluded when a dynamic object, or ker‐
               nel  module, is created, and are retained when creating a relo‐
               catable object.


               Strip line number  debug  section.  These  sections  are  named


               Strip any note section. These sections are identified by having
               a SHT_NOTE section type.

           sort_sym_addr, sort_sym_name
           sort, sort_addr, sort_name, sort_sym

               Strip the symbol sort sections  associated  to  the  SHT_SYMTAB
               symbol  table. Each of these symbol tables typically have asso‐
               ciated symbol sort sections, sorted by address, and by name.

               sort_sym_addr    By-address  .symtab   symbol   sort   sections
                                (SHT_SUNW_symsort, SHT_SUNW_tlssort).

               sort_sym_name    By-name    .symtab    symbol   sort   sections

               The remaining symbol sort section class tokens provide combina‐
               tions of the previous items, and are provided for convenience.

               sort, sort_sym    sort_sym_addr, and sort_sym_name.

               sort_addr         sort_sym_addr.

               sort_name         sort_sym_name.


               Strip  any  non-allocatable symbol table, providing the file is
               not a relocatable object. These sections are identified by hav‐
               ing a SHT_SYMTAB section type. This class also encapsulates the
               sort classes. Any associated string table or symbol  sort  sec‐
               tions are also removed.


           Strip  line  number  information only. This option is equivalent to
           using the -c option with the line class identifier.


           Print version information.


           Does not strip the symbol table. This option is equivalent to using
           the -c option with the !symbol class identifier.


           Print usage message and immediately exit.

       The following operand is supported:

       file    A path name referring to an executable file.

       See  environ(7) for descriptions of the following environment variables
       that affect the execution of strip:  LANG,  LC_ALL,  LC_CTYPE,  LC_MES‐
       SAGES, and NLSPATH.

       The following exit values are returned:

       0     Successful completion.

       >0    An error occurred.

       /tmp/strip_*    Temporary files

       See attributes(7) for descriptions of the following attributes:

       tab()  box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
       TRIBUTE VALUE _ Availabilitydeveloper/base-developer-utilities _ Inter‐
       face StabilityCommitted _ StandardSee standards(7).

       ar(1),  as(1),  elfcompress(1),  ld(1),  mcs(1), tmpnam(3C), elf(3ELF),
       ar.h(3HEAD), a.out(5), attributes(7), environ(7), standards(7)

       The strip command is used to remove a standard predefined set  of  sec‐
       tions  from  an  ELF object file. To remove a user specified section by
       name, see mcs(1).

       The strip command is unable to modify core files, or ancillary objects.

       The strip  -c option corresponds to the ld  -z strip-class option. Per‐
       forming  this  operation  at link-edit time, rather than using strip to
       post process objects is more efficient, but otherwise  equivalent.  See

Oracle Solaris 11.4             6 January 2020                        strip(1)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.