bfd/
authorAlan Modra <amodra@gmail.com>
Thu, 25 Apr 2013 13:22:52 +0000 (13:22 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 25 Apr 2013 13:22:52 +0000 (13:22 +0000)
* 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.

13 files changed:
bfd/ChangeLog
bfd/config.bfd
gas/ChangeLog
gas/configure
gas/configure.in
gold/ChangeLog
gold/configure.tgt
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/elf32lppc.sh
ld/emulparams/elf32lppclinux.sh [new file with mode: 0644]

index 103c57c93da82fd1b251307f4dee5e1239f7e6d8..007317843f1c353637c2acf6a55a1a7cf02d8094 100644 (file)
@@ -1,3 +1,7 @@
+2013-04-25  Alan Modra  <amodra@gmail.com>
+
+       * config.bfd: Add powerpc64le-linux.
+
 2013-04-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for
index aef60c792b7690c2ff00c71e0ce6f70bd99b4b41..228e7c1a5ddb2bd4cf4a4da38cfc2c6b5b591118 100644 (file)
@@ -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 d3c27065cdd2a54226a66ef7349c1174ae569266..0fd3002cdcab150543eaa81c9a33d6d127cf6bb4 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-25  Alan Modra  <amodra@gmail.com>
+
+       * configure.in: Allow little-endian linux.
+       * configure: Regenerate.
+
 2013-04-24  Sandra Loosemore  <sandra@codesourcery.com>
 
        * config/tc-nios2.c (nios2_control_register_arg_p): Rename
index 382f8d3522ba0a50a455788a43dbfe483a8232ed..6f9f5ba5baec0e3bda367e0249111c33091c60b3 100755 (executable)
@@ -11986,12 +11986,6 @@ $as_echo "$as_me: WARNING: GAS support for ${generic_target} is preliminary and
 
 $as_echo "#define AIX_WEAK_SUPPORT 1" >>confdefs.h
 
-       ;;
-      ppc-*-linux-*)
-       case "$endian" in
-         big)  ;;
-         *)    as_fn_error "GNU/Linux must be configured big endian" "$LINENO" 5 ;;
-       esac
        ;;
       ppc-*-solaris*)
        if test ${this_target} = $target; then
index 88cbff8cd563aa1d65b9fad4d31a186faa067959..37f6d5f5e7e95467e4885b4aa85d8fd89cfdd6f0 100644 (file)
@@ -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 67d7571eae3424a22c00a98737dbb1cdb35c4ae5..9fd5ded4cfd2316ed80fba04bbb7df4aca674113 100644 (file)
@@ -1,3 +1,7 @@
+2013-04-25  Alan Modra  <amodra@gmail.com>
+
+       * configure.tgt: Add powerpcle and powerpc64le.
+
 2013-04-22  Alan Modra  <amodra@gmail.com>
 
        PR gold/15355
index 504de2f2353dbc8c03e1386b1abde9b9a8b9f3d8..d61647e0ee35fa509acdee872bc39c164a9dfbb7 100644 (file)
@@ -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 5014b5f91ca25eb73a4a374b4a3d571b046b01a5..ff69706efc67a3ebe97a89515e9ee1d67f4c8019 100644 (file)
@@ -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
index e1d05d8d73136bbe0f49f15753dca1898d3c8230..e0366f366581caa8e3e1f1f96b6600a999fd5327 100644 (file)
@@ -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) \
index 180a0eda656636198dbd10bdb7c36eef35b6d23c..042e9f23a2aa276cd8aa8a56ba0801eea20b3d30 100644 (file)
@@ -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) \
index cd840e94df4565ccb052a22a8ad35262d6cf4153..65884fae8e66b75b09c994d1204ebfa77ac07aa2 100644 (file)
@@ -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 ;;
index 18cce4898eeb854e08744f5c4ea23aae11e1f6d5..8d4e3a0c078ccdb8aac7d96738a496da351dc4cf 100644 (file)
@@ -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 (file)
index 0000000..9a56372
--- /dev/null
@@ -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) }"