This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Can ELF file contain more than one symbol table?
- From: John Reiser <jreiser at bitwagon dot com>
- To: binutils at sourceware dot org
- Date: Sat, 17 Jul 2010 07:54:04 -0700
- Subject: Re: Can ELF file contain more than one symbol table?
- References: <4C419229.1050105@conus.info>
> Can ELF file contain more than one symbol table?
> Is it standardized somehow?
Most executable main programs contain three symbol tables:
a DT_SYMTAB table and a .gnu.version table that are used
by the runtime dynamic loader/linker, and a .symtab SHT_SYMTAB
table that is used by the static loader/binder and by debuggers.
There ELF file format specification itself places no restriction
on the number of any kind of symbol tables, although most
producers and most consumers pay attention to at most one
(usually the last or the first) of a particular kind.
$ readelf --all hello | grep -i sym
[ 5] .dynsym DYNSYM 0000000000400280 00000280
[ 7] .gnu.version VERSYM 000000000040031e 0000031e
[28] .symtab SYMTAB 0000000000000000 00001218
0x0000000000000006 (SYMTAB) 0x400280
0x000000006ffffff0 (VERSYM) 0x40031e
Symbol table '.dynsym' contains 4 entries:
Symbol table '.symtab' contains 64 entries:
Version symbols section '.gnu.version' contains 4 entries:
--