This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
powerpc64le-linux and powerpcle-linux
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 25 Apr 2013 22:48:09 +0930
- Subject: powerpc64le-linux and powerpcle-linux
This adds configure support for powerpc64le-linux and powerpcle-linux.
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.
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.309
diff -u -p -r1.309 config.bfd
--- bfd/config.bfd 5 Mar 2013 11:47:01 -0000 1.309
+++ bfd/config.bfd 25 Apr 2013 10:04:47 -0000
@@ -1242,7 +1242,8 @@ case "${targ}" in
targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec"
want64=true
;;
- powerpc64le-*-elf* | powerpcle-*-elf64*)
+ powerpc64le-*-elf* | powerpcle-*-elf64* | powerpc64le-*-linux* | \
+ powerpc64le-*-*bsd*)
targ_defvec=bfd_elf64_powerpcle_vec
targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec"
want64=true
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.236
diff -u -p -r1.236 configure.in
--- gas/configure.in 4 Jan 2013 17:22:47 -0000 1.236
+++ gas/configure.in 25 Apr 2013 10:04:49 -0000
@@ -176,12 +176,6 @@ changequote([,])dnl
AC_DEFINE(AIX_WEAK_SUPPORT, 1,
[Define if using AIX 5.2 value for C_WEAKEXT.])
;;
- ppc-*-linux-*)
- case "$endian" in
- big) ;;
- *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;;
- esac
- ;;
ppc-*-solaris*)
if test ${this_target} = $target; then
AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
Index: gold/configure.tgt
===================================================================
RCS file: /cvs/src/src/gold/configure.tgt,v
retrieving revision 1.9
diff -u -p -r1.9 configure.tgt
--- gold/configure.tgt 15 Sep 2012 17:11:28 -0000 1.9
+++ gold/configure.tgt 25 Apr 2013 10:04:50 -0000
@@ -104,6 +104,14 @@ powerpc-*)
targ_big_endian=true
targ_extra_big_endian=false
;;
+powerpcle-*)
+ targ_obj=powerpc
+ targ_machine=EM_PPC
+ targ_size=32
+ targ_extra_size=64
+ targ_big_endian=false
+ targ_extra_big_endian=true
+ ;;
powerpc64-*)
targ_obj=powerpc
targ_machine=EM_PPC64
@@ -112,6 +120,14 @@ powerpc64-*)
targ_big_endian=true
targ_extra_big_endian=false
;;
+powerpc64le-*)
+ targ_obj=powerpc
+ targ_machine=EM_PPC64
+ targ_size=64
+ targ_extra_size=32
+ targ_big_endian=false
+ targ_extra_big_endian=true
+ ;;
armeb*-*-*|armbe*-*-*)
targ_obj=arm
targ_extra_obj=arm-reloc-property
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.330
diff -u -p -r1.330 Makefile.am
--- ld/Makefile.am 16 Apr 2013 14:50:20 -0000 1.330
+++ ld/Makefile.am 25 Apr 2013 10:04:50 -0000
@@ -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/elf32
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) \
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.279
diff -u -p -r1.279 configure.tgt
--- ld/configure.tgt 5 Mar 2013 11:54:28 -0000 1.279
+++ ld/configure.tgt 25 Apr 2013 13:07:14 -0000
@@ -545,56 +545,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 ;;
Index: ld/emulparams/elf32lppc.sh
===================================================================
RCS file: /cvs/src/src/ld/emulparams/elf32lppc.sh,v
retrieving revision 1.4
diff -u -p -r1.4 elf32lppc.sh
--- ld/emulparams/elf32lppc.sh 22 Nov 2001 09:08:04 -0000 1.4
+++ ld/emulparams/elf32lppc.sh 25 Apr 2013 10:04:51 -0000
@@ -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"
Index: ld/emulparams/elf32lppclinux.sh
===================================================================
RCS file: ld/emulparams/elf32lppclinux.sh
diff -N ld/emulparams/elf32lppclinux.sh
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ld/emulparams/elf32lppclinux.sh 25 Apr 2013 10:04:51 -0000
@@ -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) }"
--
Alan Modra
Australia Development Lab, IBM