From: Tom Rini Date: Mon, 10 Apr 2017 14:26:48 -0400 Subject: [U-Boot] [PATCH v3] Makefile: Fix linking with modern binutils In-Reply-To: <20170409183358.5167-1-afaerber@suse.de> References: <20170409183358.5167-1-afaerber@suse.de> Message-ID: <20170410182648.GL19897@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de On Sun, Apr 09, 2017 at 08:33:58PM +0200, Andreas Färber wrote: > From: Joel Stanley > > Since Binutils 1a9ccd70f9a7[1] u-boot will not link targets that set > CONFIG_SYS_TEXT_BASE=0 with the following error: > > LD u-boot > arm-linux-gnueabi-ld.bfd: u-boot: Not enough room for program headers, try > linking with -N > arm-linux-gnueabi-ld.bfd: final link failed: Bad value > > The issue can be reproduced with the bad binutils and the rock2_defconfig > target. > > This issue was also encountered by the powerpc kernel[2], with the fix > being to pass --no-dynamic-linker for linkers newer than 2.26 when this > flag was introduced. The option tells ld that the PIE or shared lib does > not need loaded program headers. > > Ubuntu Zesty's Binutils 2.27.51.20161202 hits this error. > > [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1a9ccd70f9a7 > [2] https://git.kernel.org/cgit/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=ff45000fcb56b5b0f1a14a865d3541746d838a0a > > Signed-off-by: Joel Stanley > [AF: Apply to LDFLAGS_$(SPL_BIN) as well, suggested by Tom Rini] > Signed-off-by: Andreas Färber Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: