This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: objdump --syms output


Hi Nameer,

Unfortunately they use utterly different letter abbreviations. It is
so different

*sigh* You are right and I am wrong. I really should have checked the output of the two programs before writing my original reply.


Oh well, I am attaching a patch to add some documentation about objdump --sym's output. What do you think of it ? Does it help ?

To save you some time, here is the relevant section from the objdump manpage:

       -t
       --syms
           Print the symbol table entries of the file.  This is similar to the
           information provided by the nm program, although the display format
           is different.  The format of the output depends upon the format  of
           the  file  being  dumped,  but there are two main types.  One looks
           like this:

                   [  4](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .bss
                   [  6](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 fred

           where the number inside the square brackets is the  number  of  the
           entry  in  the  symbol table, the sec number is the section number,
           the fl value are the symbol's flag bits, the ty number is the  sym-
           bol's type, the scl number is the symbol's storage class and the nx
           value is the number of auxiliary entries associated with  the  sym-
           bol.  The last two fields are the symbol's value and its name.

           The  other common output format, usually seen with ELF based files,
           looks like this:

                   00000000 l    d  .bss   00000000 .bss
                   00000000 g       .text  00000000 fred

           Here the first number is the symbol's value (sometimes  referred  to
           as  its  address).   The next field is actually a set of characters
           and spaces indicating the flag bits that are  set  on  the  symbol.
           These  characters  are  described below.  The next field is another
           number associated with the symbol, which for common symbols is  the
           alignment  and  for other symbol is the size.  Finally the symbol's
           name is displayed.

The flag characters are divided into 7 groups as follows:

           "l"
           "g"
           "!" The symbol is local (l), global (g), neither (a space) or  both
               (!).   A symbol can be neither local or global for a variety of
               reasons, eg because it is used for debugging, but it is  proba-
               bly an indication of a bug if it is ever both local and global.
         "w" The symbol is weak (w) or strong (a space).

           "C" The symbol denotes a constructor (C) or an ordinary  symbol  (a
               space).

           "W" The  symbol  is  a warning (W) or a normal symbol (a space).  A
               warning symbol's name is a message to be displayed if the  sym-
               bol following the warning symbol is ever referenced.

           "I" The  symbol is an indirect reference to another symbol (I) or a
               normal symbol (a space).

           "d"
           "D" The symbol is a debugging symbol (d) or a dynamic symbol (D) or
               a normal symbol (a space).

           "F"
           "f"
           "O" The  symbol  is  the name of a function (f) or a file (F) or an
               object (O) or just a normal symbol (a space).

Cheers
  Nick

Attachment: binutils.texi.patch.bz2
Description: BZip2 compressed data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]