This is the mail archive of the binutils@sources.redhat.com 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: ld -shared --eh-frame-hdr gives empty eh_frame_hdr


On Fri, Jul 16, 2004 at 03:11:05PM +0200, David Simms wrote:
> Gidday,
> 
> So I was trying compile a small shared library (on x86 with: gcc 3.3.4 +
> binutils 2.15) without -fpic:
> 
>   $ gcc -c -funwind-tables -o foo.o foo.c
>   $ ld --eh-frame-hdr -shared -o foo.so foo.o

You should never use ld directly to link programs, use gcc instead.
It knows all the details how to link a program or a shared library properly.
Particularly, you haven't put in crt files, which means that .eh_frame
is likely not zero terminated as it is required to be.

	Jakub


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