This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dynamic object or not...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]