From mboxrd@z Thu Jan 1 00:00:00 1970 From: Graeme Russ Date: Wed, 04 Feb 2015 23:16:41 +1100 Subject: [U-Boot] Let's bury CONFIG_NEEDS_MANUAL_RELOC In-Reply-To: <20150204112952.2ba1e086@lilith> References: <54D1C6CE.2020307@tss-engineering.com> <20150204112952.2ba1e086@lilith> Message-ID: <54D20DA9.9010304@tss-engineering.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Albert, On 04/02/15 21:29, Albert ARIBAUD wrote: > Hello Graeme, > > On Wed, 04 Feb 2015 18:14:22 +1100, Graeme Russ > wrote: >> So the first question that we need to answer is: Do the avr32, m68k, >> nds32, and sparc toolchains support the generation of the relevant >> sections needed to perform relocation in a manner similar to x86 (i.e >> generation of relocation references into sections of the final U-Boot >> binary)? > > Those arches which use GCC should be able to use -pie / -pic-executable > and possibly --emit-relocs, as none of these is arch-specific. That was my understanding too - it's a function of ELF, not the architecture. > Then, each arch might have to look into what GCC options are needed. > For the record, on ARM, I did not need any gcc option, but actually > had one -fPIC option /removed/. Yes, I vaguely remember this. The difference is that -fPIC is used for relocatable LIBRARIES whereas -fPIE is used for relocatable EXECUTABLES. Since U-Boot is a monolithic executable, -fPIC makes no sense Regards, Graeme