0003-Makefile-unconditionally-disable-PIE.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From 0e8c3c4851ce64268a8ae1810ef72594251d917d Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 10 Nov 2019 21:57:12 +0100
  4. Subject: [PATCH] Makefile: unconditionally disable PIE
  5. Though -nostdlib is passed in $(CFLAGS), -fno-pie must also be passed to
  6. avoid linking errors related to overlapping sections if toolchain
  7. enforces PIE.
  8. Fixes:
  9. - http://autobuild.buildroot.org/results/418a40b995e91bc66e692dfbc4b0521db3fa5fbb
  10. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  11. ---
  12. Makefile | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/Makefile b/Makefile
  15. index 5226006..fe3d844 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \
  19. -Werror-implicit-function-declaration -Wstrict-prototypes \
  20. -Wdeclaration-after-statement -fno-delete-null-pointer-checks \
  21. -Wempty-body -fno-strict-overflow -fno-stack-protector \
  22. - -g -I$(INCLUDES) -O2
  23. + -fno-pie -g -I$(INCLUDES) -O2
  24. LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
  25. EXECUTABLE=am335x-pm-firmware.elf
  26. --
  27. 2.23.0