From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Sun, 31 Oct 2010 14:29:39 +0100 Subject: [U-Boot] ARM: problem with linker option -pie In-Reply-To: <4CCD5340.6050409@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> <20101031103508.A5BDD1522C0@gemini.denx.de> <4CCD4B94.90402@free.fr> <4CCD5340.6050409@free.fr> Message-ID: <4CCD6F43.7060703@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.