Static libraries forced to be PIC

Carmelo Amoroso carmelo73 at gmail.com
Fri Oct 20 08:26:25 UTC 2006


Mike Frysinger wrote:
> On Tuesday 17 October 2006 05:00, Carmelo Amoroso wrote:
>> Mike Frysinger wrote:
>>> not sh4 specific ... i'm pretty sure DOPIC is not required for
>>> FORCE_SHAREABLE_TEXT_SEGMENTS
>> Uhm, not really. If you have FORCE_SHAREABLE_TEXT_SEGMENTS defined (as
>> it is for sh4), and DOPIC=n, then the dynamic loader will refuse to load
>> any DSO flagged with TXTREL.
> 
> DOPIC=n applies to static archives ... so if you're linking static archives 
> into DSO's, then you're doing something wrong
Surely, this is not what I'm doing... what I was trying to say is that,
if we have some asm code (erroneously non PIC) into a DSO that requires 
text's relocations, the ld.so will be able to handle with them only if
FORCE_SHAREABLE is not defined, otherwise it will refuse (... and I'm 
referring to DSO).

Btw, again, my concern is about the SH4 config option that selects 
FORCE_SHAREABLE, that forces DOPIC=y not allowing to build
the static libraries as non PIC.

I'm sorry if I'm not so good expressing my thoughts, but I'm not native 
english.

Thanks and regards,
Carmelo






More information about the uClibc mailing list