aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-04-25 13:22:52 +0000
committerAlan Modra <amodra@gmail.com>2013-04-25 13:22:52 +0000
commit49926cd0c84887c581110fb2a471b21ff19048d2 (patch)
treefb156663c8852d8df60fe238414df2f614b10aea /ld
parentc65e009ff7057cbf2261bb1f8d0c2e2361b9f045 (diff)
downloadgdb-49926cd0c84887c581110fb2a471b21ff19048d2.zip
gdb-49926cd0c84887c581110fb2a471b21ff19048d2.tar.gz
gdb-49926cd0c84887c581110fb2a471b21ff19048d2.tar.bz2
bfd/
* config.bfd: Add powerpc64le-linux. gas/ * configure.in: Allow little-endian linux. * configure: Regenerate. gold/ * configure.tgt: Add powerpcle and powerpc64le. ld/ * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32lppclinux.c. (eelf32lppclinux.c): New rule. * Makefile.in: Regenerate. * configure.tgt: Merge powerpc-linux and other powerpc-elf targets with corresponding little-endian targets. * emulparams/elf32lppc.sh: Update comment. * emulparams/elf32lppclinux.sh: New.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/Makefile.am7
-rw-r--r--ld/Makefile.in8
-rw-r--r--ld/configure.tgt60
-rw-r--r--ld/emulparams/elf32lppc.sh2
-rw-r--r--ld/emulparams/elf32lppclinux.sh8
6 files changed, 58 insertions, 37 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 5014b5f..ff69706 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,13 @@
+2013-04-25 Alan Modra <amodra@gmail.com>
+
+ * Makefile.am (ALL_EMULATION_SOURCES): Add eelf32lppclinux.c.
+ (eelf32lppclinux.c): New rule.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Merge powerpc-linux and other powerpc-elf targets
+ with corresponding little-endian targets.
+ * emulparams/elf32lppc.sh: Update comment.
+ * emulparams/elf32lppclinux.sh: New.
+
2013-04-24 H.J. Lu <hongjiu.lu@intel.com>
* configure.tgt (targ_extra_emuls): Adds elf32_x86_64 for
diff --git a/ld/Makefile.am b/ld/Makefile.am
index e1d05d8..e0366f3 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -247,6 +247,7 @@ ALL_EMULATION_SOURCES = \
eelf32lm32fd.c \
eelf32lmip.c \
eelf32lppc.c \
+ eelf32lppclinux.c \
eelf32lppcnto.c \
eelf32lppcsim.c \
eelf32lsmip.c \
@@ -1106,6 +1107,12 @@ eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
ldemul-list.h \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
+eelf32lppclinux.c: $(srcdir)/emulparams/elf32lppclinux.sh \
+ $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lppclinux "$(tdir_elf32lppclinux)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
$(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 180a0ed..042e9f2 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -555,6 +555,7 @@ ALL_EMULATION_SOURCES = \
eelf32lm32fd.c \
eelf32lmip.c \
eelf32lppc.c \
+ eelf32lppclinux.c \
eelf32lppcnto.c \
eelf32lppcsim.c \
eelf32lsmip.c \
@@ -1188,6 +1189,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lm32fd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lmip.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppclinux.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcnto.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lppcsim.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32lr5900.Po@am__quote@
@@ -2591,6 +2593,12 @@ eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
ldemul-list.h \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
+eelf32lppclinux.c: $(srcdir)/emulparams/elf32lppclinux.sh \
+ $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
+ $(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32lppclinux "$(tdir_elf32lppclinux)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
$(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
diff --git a/ld/configure.tgt b/ld/configure.tgt
index cd840e9..65884fa 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -547,56 +547,44 @@ powerpc64-*-freebsd*)
tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
tdir_elf32ppc_fbsd=$tdir_elf32ppc
;;
-powerpc*-*-linux*) case "${targ}" in
+powerpc-*-vxworks*)
+ targ_emul=elf32ppcvxworks
+ targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
+powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
+ | powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
+ | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
+ case "${targ}" in
*64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
- targ_extra_libpath="elf32ppclinux elf32ppc"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc
+ targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
+ targ_extra_libpath="elf32ppc elf32ppclinux"
+ td=tdir_elf32ppc
+ case "${targ}" in
+ powerpc*le-*) td=tdir_elf32lppc;;
+ esac
+ eval ${td}=`echo "${targ_alias}" | sed -e 's/64//'`
+ eval ${td}linux=\$${td}
+ eval ${td}sim=\$${td}
;;
- *) targ_emul=elf32ppclinux
+ *linux*) targ_emul=elf32ppclinux
targ_extra_emuls="elf32ppc elf32ppcsim"
targ_extra_libpath=elf32ppc
targ64_extra_emuls=elf64ppc
targ64_extra_libpath=elf64ppc
;;
- esac ;;
-powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
- | powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
- case "${targ}" in
- *64*) targ_emul=elf64lppc
- targ_extra_emuls="elf32lppc elf32lppcsim"
- targ_extra_libpath=elf32lppc
- tdir_elf32lppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32lppcsim=$tdir_elf32lppc
- ;;
- *) targ_emul=elf32lppc
- targ_extra_emuls=elf32lppcsim
- targ64_extra_emuls=elf64lppc
- targ64_extra_libpath=elf64lppc
- ;;
- esac ;;
-powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
- | powerpc*-*-netbsd* | powerpc-*-openbsd* | powerpc*-*-kaos*)
- case "${targ}" in
- *64*) targ_emul=elf64ppc
- targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim"
- targ_extra_libpath="elf32ppc elf32ppclinux"
- tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
- tdir_elf32ppclinux=$tdir_elf32ppc
- tdir_elf32ppcsim=$tdir_elf32ppc
- ;;
*) targ_emul=elf32ppc
targ_extra_emuls="elf32ppclinux elf32ppcsim"
targ_extra_libpath=elf32ppclinux
targ64_extra_emuls=elf64ppc
targ64_extra_libpath=elf64ppc
;;
+ esac
+ case "${targ}" in
+ powerpc*le-*)
+ for z in targ_emul targ_extra_emuls targ_extra_libpath targ64_extra_emuls targ64_extra_libpath
+ do
+ eval ${z}=\"`eval echo \\$${z} | sed -e 's/ppc/lppc/g'`\"
+ done
esac ;;
-powerpc-*-vxworks*)
- targ_emul=elf32ppcvxworks
- targ_extra_emuls="elf32ppc elf32ppclinux elf32ppcsim" ;;
powerpc-*-nto*) targ_emul=elf32ppcnto ;;
powerpcle-*-nto*) targ_emul=elf32lppcnto ;;
powerpc-*-rtems*) targ_emul=elf32ppc ;;
diff --git a/ld/emulparams/elf32lppc.sh b/ld/emulparams/elf32lppc.sh
index 18cce48..8d4e3a0 100644
--- a/ld/emulparams/elf32lppc.sh
+++ b/ld/emulparams/elf32lppc.sh
@@ -1,5 +1,5 @@
# If you change this file, please also look at files which source this one:
-# elf32lppcsim.sh
+# elf32lppcsim.sh elf32lppclinux.sh
. ${srcdir}/emulparams/elf32ppc.sh
OUTPUT_FORMAT="elf32-powerpcle"
diff --git a/ld/emulparams/elf32lppclinux.sh b/ld/emulparams/elf32lppclinux.sh
new file mode 100644
index 0000000..9a56372
--- /dev/null
+++ b/ld/emulparams/elf32lppclinux.sh
@@ -0,0 +1,8 @@
+. ${srcdir}/emulparams/elf32lppc.sh
+TEXT_START_ADDR=0x10000000
+unset EXECUTABLE_SYMBOLS
+unset OTHER_END_SYMBOLS
+test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
+OTHER_RELRO_SECTIONS="
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }"