Mike
Mike

Reputation: 331

what are the common symbols in objdump?

I'm reading the documentation of objdump in :
objdump manual

and in the line that specifies the output of the symbol table for ELF based files entries with the -t option, there's one line that i would like to better understand. I copied that part of the documentation here to clarify. My question is, for the common symbols, objdump show the alignment, but what are considered the common symbols?
Thanks in advance.


Documentation content

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 refered 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. Next is the section with which the symbol is associated or ABS if the section is absolute (ie not connected with any section), or UND if the section is referenced in the file being dumped, but not defined there.

After the section name comes another field, a number, which for common symbols is the alignment and for other symbol is the size. Finally the symbol's name is displayed.

Upvotes: 1

Views: 1554

Answers (1)

ams
ams

Reputation: 25599

I'm not completely familiar with this terminology, but I believe "common symbol" refers to symbols in the "common variable storage", which means the .bss section. See the assembler documentation.

The .bss section is used for data which is uninitialised (or zero-initialized) when the program starts. This data has no value stored in the object file, so a file offset would be inappropriate.

Non-common-variable-storage symbols are variables, functions, etc. that are associated with data or code stored in the object file, and which will be loaded into memory at run time.

Upvotes: 1

Related Questions