Re: Help with ELF's ".symtab" section



"Robe" <vcrobe@xxxxxxxxx> writes:

Can anybody give me some reference about the ".symtab" section of the
ELF file.

I've read the "Tool interface standard specification 1.2" but there is
very poor information about that section there.

I'm doing a code generator and I need to know how exactly that section
work.

That section is just a table of Elf{32,64}_Syms (see /usr/include/elf.h)

It's not clear what your exact problem in understanding it is,
but these command may prove helpful:

$ readelf -S /lib/libc.so.6 | grep symtab
[62] .symtab SYMTAB 00000000 3c7674 013a50 10 63 cbc 4

$ readelf -x62 /lib/libc.so.6

Hex dump of section '.symtab':
0x00000000 00000000 00000000 00000000 00000000 ................
0x00000010 00010003 00000000 000000d4 00000000 ................
0x00000020 00020003 00000000 00002d70 00000000 ....p-..........
0x00000030 00030003 00000000 00009fd0 00000000 ................

$ readelf -s /lib/libc.so.6 | head

Symbol table '.dynsym' contains 1830 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 000000d4 0 SECTION LOCAL DEFAULT 1
2: 00002d70 0 SECTION LOCAL DEFAULT 2
3: 00009fd0 0 SECTION LOCAL DEFAULT 3

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.