aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-12-19 11:44:01 +0000
committerNick Clifton <nickc@redhat.com>2003-12-19 11:44:01 +0000
commit6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2 (patch)
tree475a1c15199a9a645d40a11faddc392816d6e35c /ld
parentc4bf77942dea9cad22426964bf32c46cbc443705 (diff)
downloadfsf-binutils-gdb-6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2.zip
fsf-binutils-gdb-6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2.tar.gz
fsf-binutils-gdb-6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2.tar.bz2
Add support for m32r-linux target, including a RELA ABI and PIC.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog12
-rw-r--r--ld/Makefile.am12
-rw-r--r--ld/Makefile.in18
-rw-r--r--ld/NEWS2
-rw-r--r--ld/configure.tgt5
-rw-r--r--ld/emulparams/m32relf_linux.sh13
-rw-r--r--ld/emulparams/m32rlelf.sh2
-rw-r--r--ld/emulparams/m32rlelf_linux.sh2
8 files changed, 62 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index dc9fc37..2666cbf 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,15 @@
+2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
+
+ Add m32r-linux and PIC support. Add new ABI that uses RELA.
+ * Makefile.am: Added em32rlelf.c, em32relf_linux.c,
+ em32rlelf_linux.c.
+ * Makefile.in: Regenerate.
+ * configure.tgt (m32r*-*-linux*, m32r*le-*-linux*, m32r*le-*-*):Added.
+ * emulparams/m32relf_linux.sh: Added.
+ * emulparams/m32rlelf.sh: Ditto.
+ * emulparams/m32rlelf_linux.sh: Ditto.
+ * NEWS: Mention support m32r Linux.
+
2003-12-18 Eric Youngdale <eric@mkssoftware.com>
Nick Clifton <nickc@redhat.com>
diff --git a/ld/Makefile.am b/ld/Makefile.am
index bff548f..2c59289 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -230,6 +230,9 @@ ALL_EMULATIONS = \
ei386pe_posix.o \
elnk960.o \
em32relf.o \
+ em32rlelf.o \
+ em32relf_linux.o \
+ em32rlelf_linux.o \
em68hc11elf.o \
em68hc11elfb.o \
em68hc12elf.o \
@@ -603,6 +606,15 @@ eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
+em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
+em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
+em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 0ee5342..1472982 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
@@ -344,6 +344,9 @@ ALL_EMULATIONS = \
ei386pe_posix.o \
elnk960.o \
em32relf.o \
+ em32rlelf.o \
+ em32relf_linux.o \
+ em32rlelf_linux.o \
em68hc11elf.o \
em68hc11elfb.o \
em68hc12elf.o \
@@ -598,7 +601,7 @@ deffilep.c ldgram.c ldlex.c
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
OBJECTS = $(ld_new_OBJECTS)
@@ -1080,7 +1083,7 @@ distclean-generic:
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "ldlex.cdeffilep.hdeffilep.cldgram.hldgram.c$(MAINTAINERCLEANFILES)" || rm -f ldlex.c deffilep.h deffilep.c ldgram.h ldgram.c $(MAINTAINERCLEANFILES)
+ -test -z "ldlexldeffilephdeffilepcldgramhldgramc$(MAINTAINERCLEANFILES)" || rm -f ldlexl deffileph deffilepc ldgramh ldgramc $(MAINTAINERCLEANFILES)
mostlyclean-am: mostlyclean-hdr mostlyclean-noinstPROGRAMS \
mostlyclean-compile mostlyclean-libtool \
mostlyclean-aminfo mostlyclean-tags mostlyclean-generic \
@@ -1329,6 +1332,15 @@ eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
+em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
+em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
+em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
diff --git a/ld/NEWS b/ld/NEWS
index 74e7131..0db0d18 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,7 @@
-*- text -*-
+* m32r Linux (ELF) support added by Renesas.
+
* Improved linker's handling of unresolved symbols. The switch
--unresolved-symbols=<method> has been added to tell the linker when it
should report them and the switch --warn-unresolved-symbols has been added to
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 29c2a7e..b9183fb 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -115,7 +115,10 @@ ia64-*-freebsd* | ia64-*-kfreebsd*-gnu)
ia64-*-netbsd*) targ_emul=elf64_ia64 ;;
ia64-*-linux*) targ_emul=elf64_ia64 ;;
ia64-*-aix*) targ_emul=elf64_aix ;;
-m32r-*-*) targ_emul=m32relf ;;
+m32r*le-*-elf*) targ_emul=m32rlelf ;;
+m32r*-*-elf*) targ_emul=m32relf ;;
+m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
+m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
diff --git a/ld/emulparams/m32relf_linux.sh b/ld/emulparams/m32relf_linux.sh
new file mode 100644
index 0000000..814c91a
--- /dev/null
+++ b/ld/emulparams/m32relf_linux.sh
@@ -0,0 +1,13 @@
+MACHINE=
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-m32r-linux"
+TEXT_START_ADDR=0x1000
+ARCH=m32r
+MACHINE=
+MAXPAGESIZE=0x1000
+
+# Hmmm, there's got to be a better way. This sets the stack to the
+# top of simulator memory (32MB).
+OTHER_RELOCATING_SECTIONS='PROVIDE (_stack = 0x2000000);'
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/ld/emulparams/m32rlelf.sh b/ld/emulparams/m32rlelf.sh
new file mode 100644
index 0000000..2d4488b
--- /dev/null
+++ b/ld/emulparams/m32rlelf.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/m32relf.sh
+OUTPUT_FORMAT="elf32-m32rle"
diff --git a/ld/emulparams/m32rlelf_linux.sh b/ld/emulparams/m32rlelf_linux.sh
new file mode 100644
index 0000000..6d16a1c
--- /dev/null
+++ b/ld/emulparams/m32rlelf_linux.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/m32relf_linux.sh
+OUTPUT_FORMAT="elf32-m32rle-linux"