This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld unpredictable lookup failure building shared library
- From: Ian Lance Taylor <iant at google dot com>
- To: "James K. Lowden" <jklowden at schemamania dot org>
- Cc: binutils at sourceware dot org
- Date: Fri, 20 Apr 2012 17:54:39 -0700
- Subject: Re: ld unpredictable lookup failure building shared library
- References: <20120420203721.1d192d67.jklowden@schemamania.org>
"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