commit | 9f1150c689431bfe7a9110e9345eaf1386712b7c | [log] [tgz] |
---|---|---|
author | Louis Mayencourt <louis.mayencourt@arm.com> | Tue Mar 05 17:08:46 2019 +0000 |
committer | Louis Mayencourt <louis.mayencourt@arm.com> | Tue Mar 12 15:49:47 2019 +0000 |
tree | 6ed403309034512587e1a5f7a3816dcc583857a3 | |
parent | 462ec4745a8afa8a1e448943d932ec3b36038888 [diff] [blame] |
Makefile: fix linking with pie and binutils > 2.27 Since binutils 1a9ccd70f9a7[1] TFA will not link when the PIE option is used: aarch64-linux-gnu-ld: build/fvp/debug/bl31/bl31.elf: Not enough room for program headers, try linking with -N aarch64-linux-gnu-ld: final link failed: Bad value This issue was also encountered by u-boot[2] and linux powerpc kernel [3]. The fix is to provide --no-dynamic-linker for the linker. This tells the linker that PIE does not need loaded program program headers. Fix https://github.com/ARM-software/tf-issues/issues/675 [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1a9ccd70f9a7 [2] http://git.denx.de/?p=u-boot.git;a=commit;h=e391b1e64b0bd65709a28a4764afe4f32d408243 [3] https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=ff45000fcb56b5b0f1a14a865d3541746d838a0a Change-Id: Ic3c33c795a9b7bdeab0e87c4345153ce2703a524 Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
diff --git a/Makefile b/Makefile index 6386bef..ad0afd3 100644 --- a/Makefile +++ b/Makefile
@@ -371,7 +371,7 @@ ifeq ($(ENABLE_PIE),1) TF_CFLAGS += -fpie - TF_LDFLAGS += -pie + TF_LDFLAGS += -pie --no-dynamic-linker else PIE_FOUND := $(findstring --enable-default-pie,${GCC_V_OUTPUT}) ifneq ($(PIE_FOUND),)