summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2013-11-18 08:01:45 -0800
committerChung-Lin Tang <cltang@codesourcery.com>2013-11-18 08:01:45 -0800
commitaeea061e1a69a316619c9418957e26a7c3f43fda (patch)
tree9a4869285b939cc1a5663dd370e04c74bd87bfc2
parent99b81d1c26745f823cfcf12378de0156823f5480 (diff)
downloadppe42-binutils-aeea061e1a69a316619c9418957e26a7c3f43fda.tar.gz
ppe42-binutils-aeea061e1a69a316619c9418957e26a7c3f43fda.zip
2013-11-18 Chung-Lin Tang <cltang@codesourcery.com>
Backport from master 2013-11-18 Chung-Lin Tang <cltang@codesourcery.com> * emulparams/nios2linux.sh: New emulation file. * configure.tgt: Add nios2*-*-linux* emulation case. * Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf. (enios2linux.c): New emulation entry. * Makefile.in: Regenerate.
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/Makefile.am5
-rw-r--r--ld/Makefile.in5
-rw-r--r--ld/configure.tgt1
-rw-r--r--ld/emulparams/nios2linux.sh20
5 files changed, 39 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index cc9c4356b3..abb87d1a18 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
+2013-11-18 Chung-Lin Tang <cltang@codesourcery.com>
+
+ Backport from master
+ 2013-11-18 Chung-Lin Tang <cltang@codesourcery.com>
+ * emulparams/nios2linux.sh: New emulation file.
+ * configure.tgt: Add nios2*-*-linux* emulation case.
+ * Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf.
+ (enios2linux.c): New emulation entry.
+ * Makefile.in: Regenerate.
+
2013-11-15 Alan Modra <amodra@gmail.com>
Apply mainline changes to 2.24
diff --git a/ld/Makefile.am b/ld/Makefile.am
index eaf82b6310..6790f45fbe 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -1755,7 +1755,10 @@ enews.c: $(srcdir)/emulparams/news.sh \
${GENSCRIPTS} news "$(tdir_news)"
enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} nios2elf "$(tdir_nios2)"
+ ${GENSCRIPTS} nios2elf "$(tdir_nios2elf)"
+enios2linux.c: $(srcdir)/emulparams/nios2linux.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} nios2linux "$(tdir_nios2linux)"
ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
$(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 21fd6b8336..7385ef4ed6 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -3237,7 +3237,10 @@ enews.c: $(srcdir)/emulparams/news.sh \
${GENSCRIPTS} news "$(tdir_news)"
enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} nios2elf "$(tdir_nios2)"
+ ${GENSCRIPTS} nios2elf "$(tdir_nios2elf)"
+enios2linux.c: $(srcdir)/emulparams/nios2linux.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} nios2linux "$(tdir_nios2linux)"
ens32knbsd.c: $(srcdir)/emulparams/ns32knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
$(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
diff --git a/ld/configure.tgt b/ld/configure.tgt
index c0291c859c..eefb772301 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -512,6 +512,7 @@ mt-*elf) targ_emul=elf32mt
msp430-*-*) targ_emul=msp430x110
targ_extra_emuls="msp430x112 msp430x1101 msp430x1111 msp430x1121 msp430x1122 msp430x1132 msp430x122 msp430x123 msp430x1222 msp430x1232 msp430x133 msp430x135 msp430x1331 msp430x1351 msp430x147 msp430x148 msp430x149 msp430x155 msp430x156 msp430x157 msp430x167 msp430x168 msp430x169 msp430x1610 msp430x1611 msp430x1612 msp430x2101 msp430x2111 msp430x2121 msp430x2131 msp430x311 msp430x312 msp430x313 msp430x314 msp430x315 msp430x323 msp430x325 msp430x336 msp430x337 msp430x412 msp430x413 msp430x415 msp430x417 msp430xE423 msp430xE425 msp430xE427 msp430xW423 msp430xW425 msp430xW427 msp430xG437 msp430xG438 msp430xG439 msp430x435 msp430x436 msp430x437 msp430x447 msp430x448 msp430x449 msp430X"
;;
+nios2*-*-linux*) targ_emul=nios2linux ;;
nios2*-*-*) targ_emul=nios2elf ;;
ns32k-pc532-mach* | ns32k-pc532-ux*) targ_emul=pc532macha ;;
ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
diff --git a/ld/emulparams/nios2linux.sh b/ld/emulparams/nios2linux.sh
new file mode 100644
index 0000000000..aa409a9ec7
--- /dev/null
+++ b/ld/emulparams/nios2linux.sh
@@ -0,0 +1,20 @@
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=
+OUTPUT_FORMAT="elf32-littlenios2"
+LITTLE_OUTPUT_FORMAT="elf32-littlenios2"
+BIG_OUTPUT_FORMAT="elf32-bignios2"
+TEXT_START_ADDR=0x2000
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x7ff0;
+ PROVIDE(gp = _gp);
+'
+ARCH=nios2
+MACHINE=
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+ENTRY=_start
+NOP=0x0001883a
+
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
OpenPOWER on IntegriCloud