diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-07 20:00:40 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2016-08-07 20:00:40 +0000 |
commit | 69448f8818ee3dc9fff403ba385a8a0572f63ea7 (patch) | |
tree | c4e1c6f93b5af8e72c484fcca559f33dc027de94 /gnu | |
parent | bd5af8c5d98e73d4787fca802b9606de216ee687 (diff) |
Since we have kbind(2), we don't need -znow to use -zrelro
ok kettenis@
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em | 18 | ||||
-rwxr-xr-x | gnu/usr.bin/binutils-2.17/ld/genscripts.sh | 6 |
2 files changed, 9 insertions, 15 deletions
diff --git a/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em b/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em index 032441bbaa9..01dd3629f13 100644 --- a/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em +++ b/gnu/usr.bin/binutils-2.17/ld/emultempl/elf32.em @@ -1940,8 +1940,7 @@ fi if test -n "$GENERATE_PIE_SCRIPT" ; then if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then echo ' ; else if (link_info.pie && link_info.combreloc' >> e${EMULATION_NAME}.c -echo ' && link_info.relro' >> e${EMULATION_NAME}.c -echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c +echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xdw >> e${EMULATION_NAME}.c echo ' ; else if (link_info.pie && link_info.combreloc && config.data_bss_contig == TRUE) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xdcz >> e${EMULATION_NAME}.c @@ -1956,8 +1955,7 @@ fi if test -n "$GENERATE_SHLIB_SCRIPT" ; then if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then echo ' ; else if (link_info.shared && link_info.combreloc' >> e${EMULATION_NAME}.c -echo ' && link_info.relro' >> e${EMULATION_NAME}.c -echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c +echo ' && link_info.relro) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xsw >> e${EMULATION_NAME}.c echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xsc >> e${EMULATION_NAME}.c @@ -1968,8 +1966,7 @@ fi echo ' ; else if (config.data_bss_contig == TRUE) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xz >> e${EMULATION_NAME}.c if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then -echo ' ; else if (link_info.combreloc && link_info.relro' >> e${EMULATION_NAME}.c -echo ' && (link_info.flags & DF_BIND_NOW)) return' >> e${EMULATION_NAME}.c +echo ' ; else if (link_info.combreloc && link_info.relro) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xw >> e${EMULATION_NAME}.c echo ' ; else if (link_info.combreloc) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xc >> e${EMULATION_NAME}.c @@ -2002,8 +1999,7 @@ fi if test -n "$GENERATE_PIE_SCRIPT" ; then if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then cat >>e${EMULATION_NAME}.c <<EOF - else if (link_info.pie && link_info.combreloc - && link_info.relro && (link_info.flags & DF_BIND_NOW)) + else if (link_info.pie && link_info.combreloc && link_info.relro) return "ldscripts/${EMULATION_NAME}.xdw"; else if (link_info.pie && link_info.combreloc && config.data_bss_contig == TRUE) return "ldscripts/${EMULATION_NAME}.xdcz"; @@ -2021,8 +2017,7 @@ fi if test -n "$GENERATE_SHLIB_SCRIPT" ; then if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then cat >>e${EMULATION_NAME}.c <<EOF - else if (link_info.shared && link_info.combreloc - && link_info.relro && (link_info.flags & DF_BIND_NOW)) + else if (link_info.shared && link_info.combreloc && link_info.relro) return "ldscripts/${EMULATION_NAME}.xsw"; else if (link_info.shared && link_info.combreloc) return "ldscripts/${EMULATION_NAME}.xsc"; @@ -2039,8 +2034,7 @@ cat >>e${EMULATION_NAME}.c <<EOF EOF if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then cat >>e${EMULATION_NAME}.c <<EOF - else if (link_info.combreloc && link_info.relro - && (link_info.flags & DF_BIND_NOW)) + else if (link_info.combreloc && link_info.relro) return "ldscripts/${EMULATION_NAME}.xw"; else if (link_info.combreloc) return "ldscripts/${EMULATION_NAME}.xc"; diff --git a/gnu/usr.bin/binutils-2.17/ld/genscripts.sh b/gnu/usr.bin/binutils-2.17/ld/genscripts.sh index 534916c1be1..6c49e4ca53f 100755 --- a/gnu/usr.bin/binutils-2.17/ld/genscripts.sh +++ b/gnu/usr.bin/binutils-2.17/ld/genscripts.sh @@ -278,7 +278,7 @@ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then LD_FLAG=w RELRO_NOW=" " COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp - ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */" + ( echo "/* Script for -z combreloc -z relro: combine and sort reloc sections */" . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME} . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xw @@ -309,7 +309,7 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; then LD_FLAG=wshared RELRO_NOW=" " COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp - ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */" + ( echo "/* Script for --shared -z combreloc -z relro: shared library, combine & sort relocs */" . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME} . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsw @@ -342,7 +342,7 @@ if test -n "$GENERATE_PIE_SCRIPT"; then LD_FLAG=wpie RELRO_NOW=" " COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp - ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */" + ( echo "/* Script for -pie -z combreloc -z relro: position independent executable, combine & sort relocs */" . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME} . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdw |