aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog11
-rw-r--r--ld/Makefile.am12
-rw-r--r--ld/Makefile.in14
-rw-r--r--ld/configure.tgt24
-rw-r--r--ld/emulparams/elf32lr5900.sh17
-rw-r--r--ld/emulparams/elf32lr5900n32.sh23
6 files changed, 101 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 1ef5336..cc3b25a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,14 @@
+2013-01-04 Juergen Urban <JuergenUrban@gmx.de>
+
+ * configure.tgt: Support ELF files for Sony Playstation 2 (for
+ ps2dev and ps2sdk).
+ * emulparams/elf32lr5900n32.sh: Create linker script for Sony
+ Playstation 2 ELF files using MIPS ABI n32.
+ * emulparams/elf32lr5900.sh: Create linker script for Sony
+ Playstation 2 ELF files using MIPS ABI o32.
+ * Makefile.am: Add linker scripts for Sony Playstation 2 ELF
+ files.
+
2013-01-02 H.J. Lu <hongjiu.lu@intel.com>
* ldver.c (ldversion): Update copyright year to 2013.
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 995e748..22eac64 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -230,6 +230,8 @@ ALL_EMULATION_SOURCES = \
eelf32ebmipvxworks.c \
eelf32elmip.c \
eelf32elmipvxworks.c \
+ eelf32lr5900.c \
+ eelf32lr5900n32.c \
eelf32epiphany.c \
eelf32epiphany_4x4.c \
eelf32fr30.c \
@@ -1041,6 +1043,16 @@ eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
$(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
+eelf32lr5900.c: $(srcdir)/emulparams/elf32lr5900.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lr5900 "$(tdir_elf32lr5900)"
+eelf32lr5900n32.c: $(srcdir)/emulparams/elf32lr5900n32.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lr5900n32 "$(tdir_elf32lr5900n32)"
eelf32epiphany.c: $(srcdir)/emulparams/elf32epiphany.sh \
$(ELF_DEPS) ${GEN_DEPENDS}
${GENSCRIPTS} elf32epiphany "$(tdir_epiphany)"
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 4e61665..8d68159 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -538,6 +538,8 @@ ALL_EMULATION_SOURCES = \
eelf32ebmipvxworks.c \
eelf32elmip.c \
eelf32elmipvxworks.c \
+ eelf32lr5900.c \
+ eelf32lr5900n32.c \
eelf32epiphany.c \
eelf32epiphany_4x4.c \
eelf32fr30.c \
@@ -1162,6 +1164,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32ebmipvxworks.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32elmip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32elmipvxworks.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900n32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32epiphany.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32epiphany_4x4.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32fr30.Po@am__quote@
@@ -2515,6 +2519,16 @@ eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
$(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
$(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
+eelf32lr5900.c: $(srcdir)/emulparams/elf32lr5900.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lr5900 "$(tdir_elf32lr5900)"
+eelf32lr5900n32.c: $(srcdir)/emulparams/elf32lr5900n32.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lr5900n32 "$(tdir_elf32lr5900n32)"
eelf32epiphany.c: $(srcdir)/emulparams/elf32epiphany.sh \
$(ELF_DEPS) ${GEN_DEPENDS}
${GENSCRIPTS} elf32epiphany "$(tdir_epiphany)"
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 61cc346..ea55895 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -1,3 +1,21 @@
+# configure.tgt
+#
+# Copyright 2013 Free Software Foundation
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
# This is the linker target specific file. This is invoked by the
# autoconf generated configure script. Putting it in a separate shell
# file lets us skip running autoconf when modifying target specific
@@ -438,6 +456,12 @@ mips*el-sde-elf*) targ_emul=elf32ltsmip
mips*-sde-elf* | mips*-mti-elf*)
targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
+mips64*el-ps2-elf*) targ_emul=elf32lr5900n32
+ targ_extra_emuls="elf32lr5900"
+ targ_extra_libpath=$targ_extra_emuls ;;
+mips*el-ps2-elf*) targ_emul=elf32lr5900
+ targ_extra_emuls="elf32lr5900n32"
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
diff --git a/ld/emulparams/elf32lr5900.sh b/ld/emulparams/elf32lr5900.sh
new file mode 100644
index 0000000..e8745ff
--- /dev/null
+++ b/ld/emulparams/elf32lr5900.sh
@@ -0,0 +1,17 @@
+. ${srcdir}/emulparams/elf32bmip.sh
+
+OUTPUT_FORMAT="elf32-littlemips"
+BIG_OUTPUT_FORMAT="elf32-bigmips"
+LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+
+TEXT_START_ADDR=0x0100000
+ARCH=mips:5900
+MACHINE=
+MAXPAGESIZE=128
+EMBEDDED=yes
+DYNAMIC_LINK=FALSE
+
+unset DATA_ADDR
+SHLIB_TEXT_START_ADDR=0
+unset GENERATE_SHLIB_SCRIPT
+
diff --git a/ld/emulparams/elf32lr5900n32.sh b/ld/emulparams/elf32lr5900n32.sh
new file mode 100644
index 0000000..69f7afb
--- /dev/null
+++ b/ld/emulparams/elf32lr5900n32.sh
@@ -0,0 +1,23 @@
+. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+
+OUTPUT_FORMAT="elf32-nlittlemips"
+BIG_OUTPUT_FORMAT="elf32-nbigmips"
+LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
+
+TEXT_START_ADDR=0x0100000
+ARCH=mips:5900
+MACHINE=
+MAXPAGESIZE=128
+EMBEDDED=yes
+DYNAMIC_LINK=FALSE
+
+OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+OTHER_SECTIONS='
+ .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+ .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+'
+
+unset DATA_ADDR
+SHLIB_TEXT_START_ADDR=0
+unset GENERATE_SHLIB_SCRIPT
+