[U-Boot] ARM: problem with linker option -pie

Albert ARIBAUD albert.aribaud at free.fr
Sun Oct 31 14:29:39 CET 2010


Le 31/10/2010 12:30, Albert ARIBAUD a écrit :
> Le 31/10/2010 11:57, Albert ARIBAUD a écrit :
>
>> I'll try 'cross-building' either this morning or in the early afternoon.
>
> Linking the CodeSourcery objects with the ELDK 4.2 linker gives a
> functional u-boot with no "bad BSS" warning.
>
> Seems like we can narrow down on binutils as I suspected.

... or maybe not.

Cross-building with one gcc and the other ld leads to the following 
obvious observation:

ELDK gcc plus ELDK or CS ld produces 3899 or 3898 .rel.dyn entries 
respectively whereas CS gcc plus CS or ELDK  produces 949 or 950 
.rel.dyn entries respectively, and I don't see a two-third drop in the 
number of literals which require relocation that would explain this 
difference.

Since changing the linker leaves almost the same relocation entry count, 
but changing gcc radically changes it, I now suspect the gcc part of the 
build rather than the ld.

One possible track is the use of -fPIE or -fpie while compiling and 
linking, I'm investigating this right now.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list