aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Clarke <stephen.clarke@earthling.net>2002-10-09 19:09:59 +0000
committerStephen Clarke <stephen.clarke@earthling.net>2002-10-09 19:09:59 +0000
commita2b3c630417d8e4a7513f3e86689ae0767b8bef8 (patch)
tree2d1d36a0a78feee9883889bd66c1032846db68f7
parentf61dfddf2d39c72b66e18861c1959c3ec06aaee8 (diff)
downloadgdb-a2b3c630417d8e4a7513f3e86689ae0767b8bef8.zip
gdb-a2b3c630417d8e4a7513f3e86689ae0767b8bef8.tar.gz
gdb-a2b3c630417d8e4a7513f3e86689ae0767b8bef8.tar.bz2
* Makefile.am: Add eshelf32_linux.o and
eshlelf32_linux.o, new emulations for sh64 Linux. * Makefile.in: Regenerate. * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations. * emulparams/shelf32_linux.sh: New file. * emulparams/shlelf32_linux.sh: New file.
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/Makefile.am14
-rw-r--r--ld/Makefile.in14
-rw-r--r--ld/configure.tgt7
-rw-r--r--ld/emulparams/shelf32_linux.sh2
-rw-r--r--ld/emulparams/shlelf32_linux.sh41
6 files changed, 88 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 48764f5..e4ffc36 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
+2002-10-09 Richard Shann <richard.shann@superh.com>
+ Stephen Clarke <stephen.clarke@superh.com>
+
+ * Makefile.am: Add eshelf32_linux.o and
+ eshlelf32_linux.o, new emulations for sh64 Linux.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add sh64eb-*-linux* and sh64-*-linux* emulations.
+ * emulparams/shelf32_linux.sh: New file.
+ * emulparams/shlelf32_linux.sh: New file.
+
2002-10-08 H.J. Lu <hjl@gnu.org>
* ldlang.c (lang_file_exist): Removed.
diff --git a/ld/Makefile.am b/ld/Makefile.am
index c89d37b..f098429 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -261,6 +261,8 @@ ALL_EMULATIONS = \
esh.o \
eshelf32.o \
eshlelf32.o \
+ eshelf32_linux.o \
+ eshlelf32_linux.o \
eshelf32_nbsd.o \
eshlelf32_nbsd.o \
eshelf.o \
@@ -986,6 +988,12 @@ eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
+eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
+ $(srcdir)/emulparams/shelf32.sh \
+ $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
+ $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
@@ -1030,6 +1038,12 @@ eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
+eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
+ $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
+ $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
+ $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index b038e17..c89f5c9 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -372,6 +372,8 @@ ALL_EMULATIONS = \
esh.o \
eshelf32.o \
eshlelf32.o \
+ eshelf32_linux.o \
+ eshlelf32_linux.o \
eshelf32_nbsd.o \
eshlelf32_nbsd.o \
eshelf.o \
@@ -1709,6 +1711,12 @@ eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
+eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
+ $(srcdir)/emulparams/shelf32.sh \
+ $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
+ $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
@@ -1753,6 +1761,12 @@ eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
+eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
+ $(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
+ $(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
+ $(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
diff --git a/ld/configure.tgt b/ld/configure.tgt
index f4afabd..48b2c5c 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -269,6 +269,13 @@ sh-*-linux*)
targ_extra_emuls=shelf_linux
targ_extra_libpath=shelf_linux
;;
+sh64eb-*-linux*) targ_emul=shelf32_linux
+ targ_extra_emuls="shlelf32_linux"
+ ;;
+sh64-*-linux*) targ_emul=shlelf32_linux
+ targ_extra_emuls="shelf32_linux"
+ targ_extra_libpath=shelf32_linux
+ ;;
sh*eb-*-linux*)
targ_emul=shelf_linux
;;
diff --git a/ld/emulparams/shelf32_linux.sh b/ld/emulparams/shelf32_linux.sh
new file mode 100644
index 0000000..a51e22f
--- /dev/null
+++ b/ld/emulparams/shelf32_linux.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/shlelf32_linux.sh
+OUTPUT_FORMAT="elf32-sh64big-linux"
diff --git a/ld/emulparams/shlelf32_linux.sh b/ld/emulparams/shlelf32_linux.sh
new file mode 100644
index 0000000..01b9ce3
--- /dev/null
+++ b/ld/emulparams/shlelf32_linux.sh
@@ -0,0 +1,41 @@
+# If you change this file, please also look at files which source this one:
+# shelf32_linux.sh
+
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-sh64-linux"
+TEXT_START_ADDR=0x400000
+MAXPAGESIZE=0x10000
+ARCH=sh
+MACHINE=sh5
+ALIGNMENT=8
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+
+
+DATA_START_SYMBOLS='PROVIDE (___data = .);'
+
+# If data is located right after .text (not explicitly specified),
+# then we need to align it to an 8-byte boundary.
+OTHER_READONLY_SECTIONS='
+PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0);
+. = ALIGN (8);
+'
+
+# Make _edata and .bss aligned by smuggling in an alignment directive.
+OTHER_GOT_SECTIONS='. = ALIGN (8);'
+
+CTOR_START='___ctors = .;'
+CTOR_END='___ctors_end = .;'
+DTOR_START='___dtors = .;'
+DTOR_END='___dtors_end = .;'
+
+# Do not use the varname=${varname-'string'} construct here; there are
+# problems with that on some shells (e.g. on Solaris) where there is a bug
+# that trigs when $varname contains a "}".
+test -z "$OTHER_RELOCATING_SECTIONS" && OTHER_RELOCATING_SECTIONS='
+ .cranges 0 : { *(.cranges) }
+'
+
+# We need to adjust sizes in the .cranges section after relaxation, so
+# we need an after_allocation function, and it goes in this file.
+EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf}