This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch 6/9] Nios II port, ld support


This patch adds linker support for Nios II. New test cases will follow separately in part 7.

-Sandra

2013-01-24  Sandra Loosemore  <sandra@codesourcery.com>
            Andrew Jenner <andrew@codesourcery.com>

Based on patches from Altera Corporation.

	ld/
	* Makefile.am (enios2elf.c): New rule.
	* Makefile.in: Regenerated.
	* configure.tgt: Add case for nios2*-*-*.
	* emulparams/nios2elf.sh: New file.

Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.325
diff -u -p -r1.325 Makefile.am
--- ld/Makefile.am	19 Jan 2013 19:36:31 -0000	1.325
+++ ld/Makefile.am	22 Jan 2013 18:36:37 -0000
@@ -1769,6 +1769,9 @@ emsp430xW427.c: $(srcdir)/emulparams/msp
 enews.c: $(srcdir)/emulparams/news.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} news "$(tdir_news)"
+enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} nios2elf "$(tdir_nios2)"
 ens32knbsd.c:	$(srcdir)/emulparams/ns32knbsd.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
   $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
Index: ld/Makefile.in
===================================================================
RCS file: /cvs/src/src/ld/Makefile.in,v
retrieving revision 1.353
diff -u -p -r1.353 Makefile.in
--- ld/Makefile.in	19 Jan 2013 19:36:31 -0000	1.353
+++ ld/Makefile.in	22 Jan 2013 18:36:37 -0000
@@ -3253,6 +3253,9 @@ emsp430xW427.c: $(srcdir)/emulparams/msp
 enews.c: $(srcdir)/emulparams/news.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} news "$(tdir_news)"
+enios2elf.c: $(srcdir)/emulparams/nios2elf.sh \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} nios2elf "$(tdir_nios2)"
 ens32knbsd.c:	$(srcdir)/emulparams/ns32knbsd.sh \
   $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/netbsd.em \
   $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.276
diff -u -p -r1.276 configure.tgt
--- ld/configure.tgt	10 Jan 2013 09:49:21 -0000	1.276
+++ ld/configure.tgt	22 Jan 2013 18:36:37 -0000
@@ -515,6 +515,7 @@ mt-*elf)                targ_emul=elf32m
 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"
 			;;
+nios2*-*-*)		targ_emul=nios2elf ;;
 ns32k-pc532-mach* | ns32k-pc532-ux*)  targ_emul=pc532macha ;;
 ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
 			;;
Index: ld/emulparams/nios2elf.sh
===================================================================
RCS file: ld/emulparams/nios2elf.sh
diff -N ld/emulparams/nios2elf.sh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ ld/emulparams/nios2elf.sh	22 Jan 2013 18:36:37 -0000
@@ -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=0x1000
+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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]