[gccsdk] PIC code in static libraries

John Tytgat John.Tytgat at aaug.net
Sat Aug 8 14:56:45 PDT 2009


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.

When reading the ELF flags for libgcc_s.so the "position independent"
(EF_ARM_PIC) is not set, while it is set for libunixlib.so.

I don't think I should consider the EF_ARM_PIC flag for shared libraries
in this sanity check I'm doing but nevertheless why is there a difference
between libgcc_s.so and libunixlib.so ?

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven



More information about the gcc mailing list