This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Dynamic object or not...
- From: Alan Modra <amodra at gmail dot com>
- To: "Paulo J. Matos" <pocmatos at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 2 Nov 2010 22:31:21 +1030
- Subject: Re: Dynamic object or not...
- References: <86k4kw3v59.fsf@pm18pc01.europe.root.pri>
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