Dynamic object or not...

Alan Modra amodra@gmail.com
Tue Nov 2 12:01:00 GMT 2010


On Tue, Nov 02, 2010 at 09:57:38AM +0000, Paulo J. Matos wrote:
> If an object is dynamic, then it has a dynamic symbol table and possibly
> a dynamic relocation table, otherwise it has a symbol table and a
> relocation table. It is not possible for an object to have both a symbol
> table and a dynamic symbol table or both relocation tables, etc. Is this
> right?

No.  Many dynamic objects have both a normal and a dynamic symbol
table.  There is no reason why they cannot have both types of
relocation too.  eg.

$ cat hello.c
#include <stdio.h>
int main (void) { printf ("Hello!\n"); return 0; }
$ gcc -o hello -O2 -Wl,-emit-relocs hello.c
$ readelf -a --wide hello | less

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list