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: R_386_32 relocations with sym-value=0 ?


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


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