[Buildroot] MIPS arch on NPTL branch

Carmelo AMOROSO carmelo.amoroso at st.com
Wed Mar 4 16:07:03 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Chapman wrote:
> Carmelo AMOROSO wrote:
>> James Chapman wrote:
>>> Carmelo AMOROSO wrote:
>>>> James Chapman wrote:
>>>>> Carmelo AMOROSO wrote:
>>>>>> James Chapman wrote:
>>>>>>> Carmelo AMOROSO wrote:
>>>>>>>> James Chapman wrote:
>>>>>>>>> Carmelo Amoroso wrote:
>>>>>>>>>> Bernhard Reutner-Fischer wrote:
>>>>>>>>>>> [James, wrong list, redirecting accordingly]
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Mar 02, 2009 at 10:27:25PM +0000, James Chapman wrote:
>>>>>>>>>>>> Just wondering what the status of the MIPS arch is on the uclibc-NPTL
>>>>>>>>>>>> branch tip.  I'm seeing compile errors because _dl_find_hash() now has
>>>>>>>>>>>> an extra argument. Is MIPS missing an update after generic ldso changes?
>>>>>>>>>> I think so
>>>>>>>>>>>> Perhaps someone is already working on this?
>>>>>>>>>> I don't think so. The patch may be trivial. If you are able to test,
>>>>>>>>>> please post the teste patch.
>>>>>>>>> Unfortunately, adding NULL values to the _dl_find_hash() calls as done
>>>>>>>>> in the attached patch doesn't produce useful executables.
>>>>>>>> I did mean trivial == pass NULL.
>>>>>>>> In the NPTL case (more correctly TLS case) it needs to pass, in some
>>>>>>>> case the exta parameter that will hold the pointer to the tpnt where
>>>>>>>> the TLS symbol has been found.
>>>>>>>>
>>>>>>>> Give me some time to check/fix your patch. I don't have any mips box
>>>>>>>> anyway to test... I'll kindly ask you to do this.
>>>>>>> Ok. I'll be happy to test.
>>>>>> James,
>>>>>> I looked at the mips specific part of ld.so and I realised that there in
>>>>>> *nothing* for handling TLS relocations. Probably Steve, who originally
>>>>>> started working on TLS/NPTL port for mips, has never released his mips work.
>>>>>> So, in one word, TLS support on NPTL branch is only available (and
>>>>>> working) for ARM and SH4, that's my understanding.
>>>>> Hmmm. MIPS/NPTL was working with TLS on the NPTL branch back in April
>>>>> 2007. My understanding is that all the work done by Steve was committed
>>>>> to svn back then. It seems to me that changes made since then broke
>>>>> MIPS. If no-one noticed until now, it's a pity.
>>>> James,
>>>> sorry sorry sorry !!!!
>>>>
>>>> you are perfectly right. I found that rev 24524 by Denys, completely
>>>> brake TLS support for MIPS !!!!!!!!!!!!!!!!!! removing all the code
>>>> related to TLS relocations.
>>>>
>>>> I'll see if I can try to recover it back.
>>> Thanks Carmelo. It's much appreciated. Let me know if you want me to try
>>> something out - I'm happy to test any work in progress.
>>
>> James,
>> I've committed a new version on elfinterp.c for MIPS trying to
>> recover/merge the version before the breaking commit.
>> Let me know if there are still problem (build/run)
> 
> Thanks. I built it and ran it. It no longer gives the invalid reloc type
> error, but the app still doesn't run properly. Unfortunately I get no
> debug output at all. I need to set up with a static shell so that I can
> run test apps buiklt with the new uclibc since it is the first app
> (/sbin/init) that fails to execute.
> 
busybox static may help a lot (not only a shell).

> If you spot what's wrong in the code, feel free to send me a patch.
>
you may try the following patch from Colin

"The fix is to change all the "__inline__" directives in
ldso/ldso/mips/dl-sysdep.h to inline __attribute__((always_inline))"

Se the thread of emails :segfault of executable with shared libraries"
There are a lot of nice tips I gave for debugging ld.so ;-)

Cheers,
Carmelo
>> Carmelo
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkmupycACgkQoRq/3BrK1s+/4gCg6ZaGxw5yM26SXx+D025ELixk
UqAAoPh+kJOUqEgBqyAfRNYIO9rRfwh3
=RJTy
-----END PGP SIGNATURE-----


More information about the uClibc mailing list