[gccsdk] PIC code in static libraries
Peter Naulls
peter at chocky.org
Mon Aug 10 11:11:14 PDT 2009
John Tytgat wrote:
> In message <4A7A3581.5010804 at chocky.org>
> Peter Naulls <peter at chocky.org> wrote:
>
>> For similar cases, John has said he'll take a look at the linker
>> to try and have it reject cases of mixing PIC and non-PIC code. This
>> will avoid problems later on with mystery crashes.
>
> I'm looking at this right now and have an idea how to do this in the
> ld source code but I see something odd which might require some attention.
>
[snip]
I do have an example of where this is going wrong - libsm6, which pulls
in libuuid, which doesn't presently have a dynamic version (will fix).
This later fails at dynamic link time with a text relocation, but it's
not at all obvious that libuuid was to blame without staring at the
build for a while.
More information about the gcc
mailing list