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 10/14] or1k ld changes


This patch adds ld code for or1k targets.
---
 ld/Makefile.am                   |    8 ++++++++
 ld/Makefile.in                   |   10 ++++++++++
 ld/configure.tgt                 |    4 ++++
 ld/emulparams/elf32or1k.sh       |   14 ++++++++++++++
 ld/emulparams/elf32or1k_linux.sh |    5 +++++
 ld/testsuite/ld-elf/sec64k.exp   |    1 +
 ld/testsuite/lib/ld-lib.exp      |    1 +
 7 files changed, 43 insertions(+)
 create mode 100644 ld/emulparams/elf32or1k.sh
 create mode 100644 ld/emulparams/elf32or1k_linux.sh

diff --git a/ld/Makefile.am b/ld/Makefile.am
index 482e1e9..15e2b7c 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -246,6 +246,8 @@ ALL_EMULATION_SOURCES = \
 	eelf32microblaze.c \
 	eelf32moxie.c \
 	eelf32mt.c \
+	eelf32or1k.c \
+	eelf32or1k_linux.c \
 	eelf32ppc.c \
 	eelf32ppc_fbsd.c \
 	eelf32ppclinux.c \
@@ -1133,6 +1135,12 @@ eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
 eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32mt "$(tdir_mt)"
+eelf32or1k.c: $(srcdir)/emulparams/elf32or1k.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32or1k "$(tdir_elf32or1k)"
+eelf32or1k_linux.c: $(srcdir)/emulparams/elf32or1k_linux.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32or1k_linux "$(tdir_elf32or1k_linux)"
 eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
   $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
   ldemul-list.h \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 9c72436..bd9a755 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -554,6 +554,8 @@ ALL_EMULATION_SOURCES = \
 	eelf32microblaze.c \
 	eelf32moxie.c \
 	eelf32mt.c \
+	eelf32or1k.c \
+	eelf32or1k_linux.c \
 	eelf32ppc.c \
 	eelf32ppc_fbsd.c \
 	eelf32ppclinux.c \
@@ -1163,6 +1165,8 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mipswindiss.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32moxie.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppc_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ppclinux.Po@am__quote@
@@ -2564,6 +2568,12 @@ eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
 eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32mt "$(tdir_mt)"
+eelf32or1k.c: $(srcdir)/emulparams/elf32or1k.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32or1k "$(tdir_elf32or1k)"
+eelf32or1k_linux.c: $(srcdir)/emulparams/elf32or1k_linux.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32or1k_linux "$(tdir_elf32or1k_linux)"
 eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
   $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
   ldemul-list.h \
diff --git a/ld/configure.tgt b/ld/configure.tgt
index df7a6e9..b773814 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -535,6 +535,10 @@ nios2*-*-*)		targ_emul=nios2elf ;;
 ns32k-pc532-mach* | ns32k-pc532-ux*)  targ_emul=pc532macha ;;
 ns32k-*-netbsd* | ns32k-pc532-lites*) targ_emul=ns32knbsd
 			;;
+or1k-*-elf | or1knd-*-elf)		targ_emul=elf32or1k ;;
+or1k-*-linux* | or1knd-*-linux*)	targ_emul=elf32or1k_linux ;;
+or1k-*-rtems* | or1knd-*-rtems*)	targ_emul=elf32or1k
+			;;
 pdp11-*-*)		targ_emul=pdp11
 			;;
 pjl*-*-*)	        targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
diff --git a/ld/emulparams/elf32or1k.sh b/ld/emulparams/elf32or1k.sh
new file mode 100644
index 0000000..e8d59b8
--- /dev/null
+++ b/ld/emulparams/elf32or1k.sh
@@ -0,0 +1,14 @@
+SCRIPT_NAME=elf
+MACHINE=
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-or1k"
+NOP=0x15000000
+TEXT_START_ADDR=0x0000
+TARGET_PAGE_SIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+EMBEDDED=yes
+ARCH=or1k
+ELFSIZE=32
+INITIAL_READONLY_SECTIONS=".vectors ${RELOCATING-0} : { KEEP (*(.vectors)) }"
+NO_REL_RELOCS=yes
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
diff --git a/ld/emulparams/elf32or1k_linux.sh b/ld/emulparams/elf32or1k_linux.sh
new file mode 100644
index 0000000..a5bf129
--- /dev/null
+++ b/ld/emulparams/elf32or1k_linux.sh
@@ -0,0 +1,5 @@
+. ${srcdir}/emulparams/elf32or1k.sh
+unset EMBEDDED
+GENERATE_SHLIB_SCRIPT=yes
+GENERATE_PIE_SCRIPT=yes
+GENERATE_COMBRELOC_SCRIPT=yes
diff --git a/ld/testsuite/ld-elf/sec64k.exp b/ld/testsuite/ld-elf/sec64k.exp
index 3c536e7..6821692 100644
--- a/ld/testsuite/ld-elf/sec64k.exp
+++ b/ld/testsuite/ld-elf/sec64k.exp
@@ -34,6 +34,7 @@ if { [istarget "arc-*-*"]
      || [istarget "dlx-*-*"]
      || [istarget "i960-*-*"]
      || [istarget "msp430*-*-*"]
+     || [istarget "or1k*-*-*"]
      || [istarget "pj*-*-*"]
      || [istarget "m32r-*-*"] } {
     return
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 88170ca..369dc1f 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -1600,6 +1600,7 @@ proc check_shared_lib_support { } {
 	 && ![istarget msp430-*-*]
 	 && ![istarget mt-*-*]
 	 && ![istarget nds32*-*-*]
+	 && ![istarget or1k*-*-*]
 	 && ![istarget pj-*-*]
 	 && ![istarget rl78-*-*]
 	 && ![istarget rx-*-*]
-- 
1.7.10.4


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