summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorjchandra <jchandra@FreeBSD.org>2011-06-01 10:23:03 +0000
committerjchandra <jchandra@FreeBSD.org>2011-06-01 10:23:03 +0000
commit6f7651b2b3ffe890097b1cb4fb10dd9e7b337df0 (patch)
treef31abcebbda1787f995f4084ef203d4aff48700b /contrib
parentc63bfb04c3139c3af9cec31b0e1e350c7bd0bef4 (diff)
downloadFreeBSD-src-6f7651b2b3ffe890097b1cb4fb10dd9e7b337df0.zip
FreeBSD-src-6f7651b2b3ffe890097b1cb4fb10dd9e7b337df0.tar.gz
Add .interp back into INITIAL_READONLY_SECTIONS in MIPS n64 ABI.
The binutils update in r218822 caused the MIPS n64 dynamic binaries to fail because the ".interp" section is not in the initial sections. This happens because elf64bmip-defs.sh overrides INITIAL_READONLY_SECTIONS to add ".MIPS.options" sections instead of the ".reginfo" section used by n32. This used to work fine, but after r218822, INITIAL_READONLY_SECTIONS also contains the .interp section, so the override has to be done differently. Reported by : aduane at juniper Obtained from: gonzo (Initial version)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/binutils/ld/emulparams/elf64bmip-defs.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/binutils/ld/emulparams/elf64bmip-defs.sh b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
index 110f892..73094be 100644
--- a/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
+++ b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
@@ -1,3 +1,11 @@
. ${srcdir}/emulparams/elf32bmipn32-defs.sh
COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+
+# elf32bmipn32-defs.sh use .reginfo, n64 ABI should use .MIPS.options,
+# override INITIAL_READONLY_SECTIONS to do this.
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .MIPS.options ${RELOCATING-0} : { *(.MIPS.options) }"
OpenPOWER on IntegriCloud