[PATCH] sh: Add PIC implementation for crt1.S
Carmelo Amoroso
carmelo73 at gmail.com
Fri May 1 15:56:45 UTC 2009
Peter Griffin wrote:
>> Hi Pete,
>> I tried you patch but I cannot link a pie application (simple hello)
>> due to linker error as below:
>>
>> /opt/STM/STLinux-2.3/devkit/sh4_uclibc/lib/gcc/sh4-linux-uclibc/4.2.4/../../../../sh4-linux-uclibc/bin/ld:
>> /opt/STM/STLinux-2.3/devkit/sh4_uclibc/target/usr/lib/Scrt1.o(.text+0x40):
>> unresolvable R_SH_GOTOFF relocation against symbol `__uClibc_main'
>> /opt/STM/STLinux-2.3/devkit/sh4_uclibc/lib/gcc/sh4-linux-uclibc/4.2.4/../../../../sh4-linux-uclibc/bin/ld:
>> final link failed: Nonrepresentable section on output
>> collect2: ld returned 1 exit status
>>
>> I've fixed your patch... GOTOFF relocation should be used for static
>> data access, not for function call. I've fixed it by using a GOT
>> entry. I've linked a pie hello application and I do not have any
>> TEXTREL.
>> Please may you try my version (attached) on your system.
>>
>> Thanks,
>> Carmelo
> Hi Carmelo,
>
> Sorry about the delay in getting back to you. I'm having problems
> recreating the toolchain I used to build the SH2A PIC binaries. Nothing
> to do with the patch or your changes.
>
> I should have submitted the patch a couple of weeks ago when I had
> everything still on my system :-(
>
> I'll let you know when I get it going.
>
> regards,
>
> Peter.
>
Ok,
I'm using the modify version of your patch on MMU sh4/nptl system
without problem, and indeed it solved the issue with dbus.
I'd like to have just one patch working fin for sh2a; so I'll wait
your feedback before committing it.
Thanks,
Carmelo
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc
>
More information about the uClibc
mailing list