From: Kim Phillips Date: Tue, 12 Oct 2010 13:38:38 -0500 Subject: [U-Boot] [PATCH] mpc83xx: Add -fpic relocation support In-Reply-To: <20101012132540.798afd99@udp111988uds.am.freescale.net> References: <1286887081-23172-1-git-send-email-Joakim.Tjernlund@transmode.se> <20101012125218.6ABE21508A2@gemini.denx.de> <20101012134719.5BB9814F310@gemini.denx.de> <20101012123125.7c08f50a.kim.phillips@freescale.com> <20101012131938.057e9b32.kim.phillips@freescale.com> <20101012132540.798afd99@udp111988uds.am.freescale.net> Message-ID: <20101012133838.4d9658af.kim.phillips@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, 12 Oct 2010 13:25:40 -0500 Scott Wood wrote: > On Tue, 12 Oct 2010 13:19:38 -0500 > Kim Phillips wrote: > > > On Tue, 12 Oct 2010 19:41:56 +0200 > > Joakim Tjernlund wrote: > > > > > Kim Phillips wrote on 2010/10/12 19:31:25: > > > > that moderate size increase in start.S breaks nand builds: > > > > > > > > Configuring for MPC8313ERDB_NAND_66 board... > > > > start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_' > > > > make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1 > > > > > > ehh, these got there own linker scripts it seems > > > I could #ifdef NAND_SPL I guess? > > > Or possbly select one of GUT/GOT2 based on > > > #if __pic__ == 1 > > > > I think NAND_SPL would be clearer, assuming no other differences are > > involved. > > Why? The type of PIC is the distinction. If it can be determined with > __pic__, wouldn't that also avoid the extra code being present in the > main U-Boot if an older toolchain is used and we end up with -fPIC? > And there could be other types of SPL besides NAND. that's true - I was going for more reader consistency wrt the current code. > The linker scripts for NAND SPL would still have to be updated, though, > or else wouldn't it break with a new toolchain that actually uses > -fpic? I assume we're not passing different flags when building the > SPL. we're not. Kim