Home > database >  objdump -t columns meaning
objdump -t columns meaning

Time:07-13

[  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

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 symbol's type, the scl number is the symbol's storage class and the nx value is the number of auxilary entries associated with the symbol. The last two fields are the symbol's value and its name.

I want to know if is there a way to findout which one is a local and which one is a global symbol?

the same way as you can tell from lowercase/uppercase of flags when using nm command.

EDIT: i know about this too

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

but when i use objdump -t on my object file this is not the output format im getting. (im using g -c to compile and my os is windows 10, if this matters)

thanks

[SOLVED] Dumpbin.exe Thanks for mentionin this in comment. this one seems so clear to understand.

CodePudding user response:

You talk about nm, thus you talk about ELF files. Continue reading the manual:

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

The symbol is a local (l), global (g), unique global (u), neither global nor local (a space) or both global and local (!).


Before asking a question, I suggest that you practices the command invocations and compare command outputs with examples in the manual parts that you are reading.

  • Related