R_386_32 relocations with sym-value=0 ?

Nils Asmussen nils@script-solution.de
Tue Aug 17 09:51:00 GMT 2010


Hi,

> You won't get a fully working shared libstdc++ with either of these
> command lines.  Without startup files, how do you run any
> initialization functions in libstdc++?
At the moment my dynamic linker locates the .ctors-section in all
libraries and calls all functions found there. As far as I've seen it so
far, it works fine. Or did I miss something?

> Zero isn't a special value.  If a sym is undefined that's the usual
> value.  You are likely getting these relocs because you are trying to
> build a shared lib without -fPIC or -fpic.  That's a bad idea for two
> reasons:
> 1) non-PIC will give you relocations in text, which will result in
>    non-shared pages, and
> 2) gcc will generate code that does not satisfy ELF shared library
>    semantics.
> 
hm..all my object-files are build with -fPIC.

Nils Asmussen



More information about the Binutils mailing list