Turning off relro shouldn't insert padding into the middle of the relro
authorguenther <guenther@openbsd.org>
Sun, 14 Aug 2016 04:25:27 +0000 (04:25 +0000)
committerguenther <guenther@openbsd.org>
Sun, 14 Aug 2016 04:25:27 +0000 (04:25 +0000)
section; remove the PAD_GOT0 use that I should have deleted before.  This
caused ld.so crashes on arm when building binutils.

critical debugging observations by kettenis@

gnu/usr.bin/binutils-2.17/ld/scripttempl/elf.sc

index c92ea87..4d0946e 100644 (file)
@@ -248,8 +248,6 @@ else
 fi
 
 cat <<EOF
-/* DATA_GOT=${DATA_GET+y} SDATA_GOT=${SDATA_GOT+y} SEPARATE_GOTPLT=${SEPARATE_GOTPLT+y} */
-/* DATA_PLT=${DATA_PLT+y} BSS_PLT=${BSS_PLT+y} DATA_NONEXEC_PLT=${DATA_NONEXEC_PLT+y} */
 OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
              "${LITTLE_OUTPUT_FORMAT}")
 OUTPUT_ARCH(${OUTPUT_ARCH})
@@ -433,7 +431,6 @@ cat <<EOF
   ${RELOCATING+${DATARELRO}}
   ${OTHER_RELRO_SECTIONS}
   ${TEXT_DYNAMIC-${DYNAMIC}}
-  ${DATA_GOT+${RELRO_NOW-${PAD_GOT+${PAD_GOT0}}}}
   /* If PAD_CDTOR, and separate .got and .got.plt sections, CTOR and DTOR
      are relocated here to receive the same mprotect protection as .got */
   ${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${PAD_CDTOR+${RELOCATING+${CTOR}}}}}}