This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] MIPS/LD: Correct `mips-*-windiss' target emulation configuration
- From: Maciej W.Rozycki <macro at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 26 Jan 2018 23:06:08 -0000
- Subject: [binutils-gdb] MIPS/LD: Correct `mips-*-windiss' target emulation configuration
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2ebd05b80b22ebf0e6c8b597f165c1e6bd6867f4
commit 2ebd05b80b22ebf0e6c8b597f165c1e6bd6867f4
Author: Maciej W. Rozycki <macro@mips.com>
Date: Fri Jan 26 23:05:06 2018 +0000
MIPS/LD: Correct `mips-*-windiss' target emulation configuration
Fix an issue with commit 73934d319dae ("Disable .gnu.hash on MIPS
targets"), <https://sourceware.org/ml/binutils/2006-07/msg00341.html>,
which in turn caused a regression with commit 861fb55ab50a ("Defer
allocation of R_MIPS_REL32 GOT slots"),
<https://sourceware.org/ml/binutils/2008-08/msg00096.html>, and use
`mipself.em' as the extra emulation file for `mips-*-windiss' targets,
removing a segmentation fault triggered as `_bfd_mips_elf_final_link'
calls `htab_traverse' to process LA25 stubs with `htab->la25_stubs'
being NULL. This is in turn due to `_bfd_mips_elf_init_stubs' not
having been called, which is only done by `mipself.em'. No LA25 stubs
are supposed to be produced for `mips-*-windiss' targets, however the
internal data structures have to be initialized.
ld/
* emulparams/elf32mipswindiss.sh (EXTRA_EM_FILE): Set to
`mipself'.
Diff:
---
ld/ChangeLog | 5 +++++
ld/emulparams/elf32mipswindiss.sh | 1 +
2 files changed, 6 insertions(+)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b641638..3430a86 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-26 Maciej W. Rozycki <macro@mips.com>
+
+ * emulparams/elf32mipswindiss.sh (EXTRA_EM_FILE): Set to
+ `mipself'.
+
2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
* testsuite/ld-sparc/sparc.exp (32-bit: Helper shared library):
diff --git a/ld/emulparams/elf32mipswindiss.sh b/ld/emulparams/elf32mipswindiss.sh
index 3b9678b..b8bb87e 100644
--- a/ld/emulparams/elf32mipswindiss.sh
+++ b/ld/emulparams/elf32mipswindiss.sh
@@ -1,4 +1,5 @@
TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=mipself
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
BIG_OUTPUT_FORMAT="elf32-bigmips"