* Makefile.am: Add eshelf32_linux.o and
authorStephen Clarke <stephen.clarke@earthling.net>
Wed, 9 Oct 2002 19:09:59 +0000 (19:09 +0000)
committerStephen Clarke <stephen.clarke@earthling.net>
Wed, 9 Oct 2002 19:09:59 +0000 (19:09 +0000)
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.

ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/shelf32_linux.sh [new file with mode: 0644]
ld/emulparams/shlelf32_linux.sh [new file with mode: 0644]

index 48764f52dc750326288ef5a96d998b137bcd3274..e4ffc360c73b0d7358bb1672801795978419da77 100644 (file)
@@ -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.
index c89d37bd6d5407725f9ea4d5c67530ad014539b2..f098429b21ac16a9e604bbaae6361bab0081cc50 100644 (file)
@@ -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 \
index b038e17b9e98da3f98eb535362b53ffe2bb29b79..c89f5c9e9b5f7cbeb2e28b6215047683c441e5e2 100644 (file)
@@ -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 \
index f4afabde6d601f9611d649928c15bd72491dd1f5..48b2c5c045bdbd13ac7e5434df2976ec64a922c3 100644 (file)
@@ -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 (file)
index 0000000..a51e22f
--- /dev/null
@@ -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 (file)
index 0000000..01b9ce3
--- /dev/null
@@ -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}