ld -shared --eh-frame-hdr gives empty eh_frame_hdr
Fri Jul 16 13:16:00 GMT 2004
On Fri, Jul 16, 2004 at 03:11:05PM +0200, David Simms wrote:
> 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.
More information about the Binutils