From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 31 Oct 2010 11:35:08 +0100 Subject: [U-Boot] ARM: problem with linker option -pie In-Reply-To: <4CCD3A6F.7040303@free.fr> References: <4CCC8206.40206@gmail.com> <20101030204310.3C78A1522C0@gemini.denx.de> <4CCC85B4.6060102@gmail.com> <20101030211711.C45471522C0@gemini.denx.de> <4CCC915F.1090608@free.fr> <4CCCAACE.6060005@free.fr> <4CCD26B7.8090503@free.fr> <20101031092434.57B081522C0@gemini.denx.de> <4CCD3A6F.7040303@free.fr> Message-ID: <20101031103508.A5BDD1522C0@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Albert ARIBAUD, In message <4CCD3A6F.7040303@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)