[PATCH] sh: Add PIC implementation for crt1.S

Peter Griffin pgriffin at mpc-data.co.uk
Thu Apr 30 05:52:32 UTC 2009


> Hi Peter,
> where is it supposed to be required to be PIC... for PIE programs?
> Indeed I'm seeing a problem with dbus due to TEXTREL that are not
> allowed by ld.so for sh4... and I've seen that the relocations are
> from crt1.S related to uCLibc_main and abort... so I'm thinking that
> your patch will solve my issue too ;-)
> 
> cheers,
> carmelo
> 
> Hi Carmelo,
> 
> Yes for PIE programs, I wrote the patch to get PIE running on SH2A
> NOMMU, with the ultimate aim of one day having XIP and shared libs in
> uClinux for SH2A.
> 
> I can't get XIP running yet because of a SH toolchain issue. I believe
> SH needs an equivalent of single-pic-base like in ARM, so the PIC
> register is not setup in the prologue of every function.
> 
> Hopefully it will fix your issue to :-)
> 
> regards, 
> 
> Pete.



More information about the uClibc mailing list