From: guenther Date: Sun, 7 Aug 2016 20:00:39 +0000 (+0000) Subject: Since we have kbind(2), we don't need -znow to use -zrelro X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e5211dee6f714b9ea4c6457ee0ec200ababb6b0f;p=openbsd Since we have kbind(2), we don't need -znow to use -zrelro ok kettenis@ --- 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 <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c < 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