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

Wolfgang Denk wd at denx.de
Sun Oct 31 11:35:08 CET 2010


Dear Albert ARIBAUD,

In message <4CCD3A6F.7040303 at free.fr> you wrote:
> 
> 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.

Thanks for checking.

> 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.

Yes, I know. My speculation was that suchbehaviour (or linker options
to adjust it) might have changed in more recent versions of
gcc/binutils.


BTW: I would like to point out that so far we're blaming GCC, which is
not exaclt correct, as we always tested GCC+Binutils combos. For
completeness, we should separate compilation and linking and test for
example ELDK's gcc with CS's ld, and vice versa.  Hope I will find
some time later this night.  Hope the ghosts won't make too much of a
noise.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Real Programmers always confuse Christmas and Halloween because
OCT 31 == DEC 25 !  - Andrew Rutherford (andrewr at ucs.adelaide.edu.au)


More information about the U-Boot mailing list