0005-staticpie.diff 1021 B

123456789101112131415161718192021222324
  1. --- gcc-5.2.0.orig/gcc/config/gnu-user.h 2015-01-05 12:33:28.000000000 +0000
  2. +++ gcc-5.2.0/gcc/config/gnu-user.h 2015-08-25 08:15:18.354957759 +0000
  3. @@ -42,8 +42,8 @@
  4. #if defined HAVE_LD_PIE
  5. #define GNU_USER_TARGET_STARTFILE_SPEC \
  6. - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
  7. - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s} \
  8. + "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:%{static:rcrt1.o%s;:Scrt1.o%s};:crt1.o%s}} \
  9. + crti.o%s %{shared|pie:crtbeginS.o%s;static:crtbeginT.o%s;:crtbegin.o%s} \
  10. %{fvtable-verify=none:%s; \
  11. fvtable-verify=preinit:vtv_start_preinit.o%s; \
  12. fvtable-verify=std:vtv_start.o%s}"
  13. --- gcc-5.2.0.orig/gcc/gcc.c 2015-03-10 09:37:41.000000000 +0000
  14. +++ gcc-5.2.0/gcc/gcc.c 2015-09-30 00:25:33.225927941 +0000
  15. @@ -739,7 +739,7 @@
  16. #ifndef LINK_PIE_SPEC
  17. #ifdef HAVE_LD_PIE
  18. -#define LINK_PIE_SPEC "%{pie:-pie} "
  19. +#define LINK_PIE_SPEC "%{pie:-pie %{static:--no-dynamic-linker}} "
  20. #else
  21. #define LINK_PIE_SPEC "%{pie:} "
  22. #endif