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

Albert ARIBAUD albert.aribaud at free.fr
Sun Oct 31 10:44:15 CET 2010


Le 31/10/2010 10:24, Wolfgang Denk a écrit :

>> I will now analyze the patch code to see if it contains relocations that
>> should have applied but did not, or if it misses relocations altogether.
>> My currently favored bet right now is that BSS may have gotten its own
>> relocation table in later toolchains, but that's only a bet.
>
> Hm.... probably not BSS as such, but eventually the linker treats
> segments without "LOAD" attribute differently?

The first test I did with a sample program which contains the three 
types of static scope objects: const, initialized and uninitialized, and 
I checked that the inititialized one lands in BSS which has NOBITS while 
explicitely initialized objects land in data sections with PROGBITS -- 
that's akin to the LOAD attribute.

Both the ELDK 4.2 and the CS toolchains' linkers treat all three object 
types the same way with respect to relocation, and emit relocations to 
the uninitialized object, so not having LOAD attribute is irrelevant -- 
BTW if it was, BSS relocation would never have worked.

> Best regards,
>
> Wolfgang Denk

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list