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: ld unpredictable lookup failure building shared library


"James K. Lowden" <jklowden@schemamania.org> writes:

> I'm attempting to build clang on x86_64.  ld fails to look up a symbol
> from std::string, recommending -fPIC, but file(1) reports the object
> file is relocatable.

Relocatable is not the same as -fPIC Relocatable just means relocatable
at link tie.  The -fPIC option constructs an object file that is
relocatable at runtime.  Have you tried actually using the -fPIC option
when compiling the file?

Ian


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