aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/mipself.em
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2006-07-29 08:48:15 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2006-07-29 08:48:15 +0000
commit73934d319daea32d895f8f02c6f52846ccbba044 (patch)
treed1c0408dad2055e9fd31cd58fd6f8ef714821431 /ld/emultempl/mipself.em
parent07082420d7deccfc8d4420359a075c70f98c8a64 (diff)
downloadgdb-73934d319daea32d895f8f02c6f52846ccbba044.zip
gdb-73934d319daea32d895f8f02c6f52846ccbba044.tar.gz
gdb-73934d319daea32d895f8f02c6f52846ccbba044.tar.bz2
ld/
* Makefile.am (eelf32b4300.c): Update dependencies. (eelf32bmip.c): Likewise. (eelf32bsmip.c): Likewise. (eelf32btsmip.c): Likewise. (eelf32btsmipn32.c): Likewise. (eelf32ltsmip.c): Likewise. (eelf32ltsmipn32.c): Likewise. (eelf32ebmip.c): Likewise. (eelf32ebmipvxworks.c): Likewise. (eelf32elmip.c): Likewise. (eelf32elmipvxworks.c): Likewise. (eelf32bmipn32.c): Likewise. (eelf32lmip.c): Likewise. (eelf32mipswindiss.c): Likewise. (eelf32lsmip.c): Likewise. (eelf64bmip.c): Likewise. (eelf64btsmip.c): Likewise. (eelf64ltsmip.c): Likewise. (emipsbig.c): Likewise. Canonicalize ${GENSCRIPTS} line. (emipsbsd.c): Likewise. (emipsidt.c): Update dependencies. (emipsidtl.c): Likewise. (emipslit.c): Likewise. (emipslnews.c): Likewise. (emipspe.c): Likewise. Fix ${GENSCRIPTS} invocation. * Makefile.in: Regenerate. * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define. * emulparams/elf32bmipn32-defs.sh (EXTRA_EM_FILE): Likewise. * emultempl/irix.em: Include emultempl/mipself.em. * emultempl/mipself.em: New file. ld/testsuite/ * ld-mips-elf/hash1.s, ld-mips-elf/hash1a.d, * ld-mips-elf/hash1b.d, ld-mips-elf/hash1c.d: New tests. * ld-mips-elf/mips-elf.exp: Run them.
Diffstat (limited to 'ld/emultempl/mipself.em')
-rw-r--r--ld/emultempl/mipself.em37
1 files changed, 37 insertions, 0 deletions
diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em
new file mode 100644
index 0000000..846cdc5
--- /dev/null
+++ b/ld/emultempl/mipself.em
@@ -0,0 +1,37 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+static void
+mips_after_parse (void)
+{
+ /* .gnu.hash and the MIPS ABI require .dynsym to be sorted in different
+ ways. .gnu.hash needs symbols to be grouped by hash code whereas the
+ MIPS ABI requires a mapping between the GOT and the symbol table. */
+ if (link_info.emit_gnu_hash)
+ {
+ einfo ("%X%P: .gnu.hash is incompatible with the MIPS ABI\n");
+ link_info.emit_hash = TRUE;
+ link_info.emit_gnu_hash = FALSE;
+ }
+ after_parse_default ();
+}
+EOF
+
+LDEMUL_AFTER_PARSE=mips_after_parse