libc contains TEXTREL with -fPIC (using NPTL)

Carmelo Amoroso carmelo73 at gmail.com
Fri May 19 11:21:06 UTC 2006


On 5/18/06, Peter S. Mazinger <ps.m at gmx.net> wrote:
>
> On Thu, 18 May 2006, Carmelo Amoroso wrote:
>
> > On 5/17/06, Peter S. Mazinger <ps.m at gmx.net> wrote:
> > >
> > > On Wed, 17 May 2006, Carmelo Amoroso wrote:
> > >
> > > > Hi all,
> > > > I'm tryng to port the uClibc-nptl branch over sh4 core.
> > >
> > > that branch is not finished, wait until it has the final version, then
> you
> > > can try to port it sh4
> > >
> > > Peter
> >
> >
> > Hi,
> > I understood. but the problem I'm having  seems to be not related  to
> the
> > nptl/TLS implementation.
>
> build uClibc-svn by enabling LINUXTHREADS_OLD and see if you have the same
> problem
>
> > I don't currently have a uClibc-nptl working environment, simply a
> > nptl-uClibc built on sh4.
>
> what is that (nptl-uClibc) ? I have seen only an uClibc-nptl branch
>
> > I'm wondering to understand while the TEXTREL flag is appearing in my
> > libc.so.0 even if I'm using -fPIC.
> > Could be something related to a wrong cross-compiler configuration?
> > or the assumptiom about TEXTREL and -fPIC is wrong when we use TLS
> variable?
>
> As I said you are not allowed (or if you do, you are on your own) if you
> use anything TLS related (new linuxthreads and nptl fall into this
> category)
>
> I know of more causes for TEXTREL
> 1. binutils failing for sh (for ex. it did for arm until 2.16.1)
> 2. if you removed -z defs (as proposed some time ago and I said that it
> is the worth you can do), then because you miss some symbol
> 3. non-PIC aware asm code in the arch specific parts
>
> Download pax-utils from any gentoo site, and run scanelf -q -t -T
> libuClibc-0.9.28.so, that will list you the possible offenders


Thanks to scanelf I discovered  that  the cause of the TEXTREL is inside
some asm code,
just as Peter suggested. I'm investing on it.

Thanks again to all

Carmelo

Peter
> >
> > Thanks again for any suggestions,
> >
> > Carmelo
> >
> > > For what I know I sholud not expect the TEXTREL fls into the dynamic
> > > section
> > > > building pic code, but it happened.
> > > > So the dynamic linker (built with FORCE_SHAREABLE_TEXT_SEGMENTS)
> stops
> > > when
> > > > trying to load the libc flagged with TEXTREL.
> > > >
> > > > What is going wrong? could any one help me?
> > > >
> > > > If you need further information, I'll add them.
> > > >
> > > > Thanks,
> > > > Carmelo
> > > >
> > >
> > > --
> > > Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
> > > Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2
> > >
> > >
> >
>
> --
> Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
> Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20060519/d4f8473c/attachment-0001.htm 


More information about the uClibc mailing list