OSDN Git Service

* Makefile.am (ALL_64_EMULATION_SOURCES): Add powerpc64-*-freebsd
authoramodra <amodra>
Mon, 21 Nov 2011 13:22:41 +0000 (13:22 +0000)
committeramodra <amodra>
Mon, 21 Nov 2011 13:22:41 +0000 (13:22 +0000)
source.
(eelf64ppc_fbsd.c): Add rules to build this file.
* Makefile.in: Regenerate.
* configure.tgt: Add target definition for powerpc64-*-freebsd*.
Adjust powerpc-*-freebsd*.
* emultempl/ppc64elf.em: Add a mechanism to override the default
value of 0 for plt_static_chain.
* emulparams/elf32ppc_fbsd.sh (OUTPUT_FORMAT): Override the default.
* emulparams/elf64ppc_fbsd.sh (OUTPUT_FORMAT): Likewise.
(DEFAULT_PLT_STATIC_CHAIN): Define to 1.

ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/elf32ppc_fbsd.sh
ld/emulparams/elf64ppc_fbsd.sh [new file with mode: 0644]
ld/emultempl/ppc64elf.em

index 9e56b66..5d8c7f1 100644 (file)
@@ -1,3 +1,17 @@
+2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
+
+       * Makefile.am (ALL_64_EMULATION_SOURCES): Add powerpc64-*-freebsd
+       source.
+       (eelf64ppc_fbsd.c): Add rules to build this file.
+       * Makefile.in: Regenerate.
+       * configure.tgt: Add target definition for powerpc64-*-freebsd*.
+       Adjust powerpc-*-freebsd*.
+       * emultempl/ppc64elf.em: Add a mechanism to override the default
+       value of 0 for plt_static_chain.
+       * emulparams/elf32ppc_fbsd.sh (OUTPUT_FORMAT): Override the default.
+       * emulparams/elf64ppc_fbsd.sh (OUTPUT_FORMAT): Likewise.
+       (DEFAULT_PLT_STATIC_CHAIN): Define to 1.
+
 2011-11-15  Andreas Schwab  <schwab@linux-m68k.org>
 
        * ldlang.c (insert_pad): Change alignment_needed argument to
index 93c2832..6bfb15c 100644 (file)
@@ -480,6 +480,7 @@ ALL_64_EMULATION_SOURCES = \
        eelf64ltsmip_fbsd.c \
        eelf64mmix.c \
        eelf64ppc.c \
+       eelf64ppc_fbsd.c \
        eelf64tilegx.c \
        eelf_l1om.c \
        eelf_l1om_fbsd.c \
@@ -1980,6 +1981,10 @@ eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
   ldemul-list.h \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
+eelf64ppc_fbsd.c: $(srcdir)/emulparams/elf64ppc_fbsd.sh \
+  $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)"
 eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
index 698117e..a7bbe41 100644 (file)
@@ -785,6 +785,7 @@ ALL_64_EMULATION_SOURCES = \
        eelf64ltsmip_fbsd.c \
        eelf64mmix.c \
        eelf64ppc.c \
+       eelf64ppc_fbsd.c \
        eelf64tilegx.c \
        eelf_l1om.c \
        eelf_l1om_fbsd.c \
@@ -1184,6 +1185,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ltsmip_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc_fbsd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386_be.Po@am__quote@
@@ -3435,6 +3437,10 @@ eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
   ldemul-list.h \
   $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
        ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
+eelf64ppc_fbsd.c: $(srcdir)/emulparams/elf64ppc_fbsd.sh \
+  $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \
+  $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+       ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)"
 eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
   $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
index 978a801..8088f2d 100644 (file)
@@ -455,10 +455,17 @@ pjl*-*-*)         targ_emul=pjlelf ; targ_extra_emuls="elf_i386" ;;
 pj*-*-*)               targ_emul=pjelf
                        ;;
 powerpc-*-freebsd* | powerpc-*-kfreebsd*-gnu)
-                       targ_emul=elf32ppc_fbsd;
-                       targ_extra_emuls="elf32ppc elf32ppcsim";
+                       targ_emul=elf32ppc_fbsd
+                       targ_extra_emuls="elf32ppc elf32ppcsim"
                        targ_extra_libpath=elf32ppc;
                        tdir_elf32ppcsim=`echo ${targ_alias} | sed -e 's/ppc/ppcsim/'` ;;
+powerpc64-*-freebsd*)
+                       targ_emul=elf64ppc_fbsd
+                       targ_extra_emuls="elf64ppc elf32ppc_fbsd elf32ppc"
+                       targ_extra_libpath="elf32ppc_fbsd elf32ppc"
+                       tdir_elf32ppc=`echo "${targ_alias}" | sed -e 's/64//'`
+                       tdir_elf32ppc_fbsd=$tdir_elf32ppc
+                       ;;
 powerpc*-*-linux*)     case "${targ}" in
                        *64*)   targ_emul=elf64ppc
                                targ_extra_emuls="elf32ppclinux elf32ppc elf32ppcsim"
index 2bac85c..0025b61 100644 (file)
@@ -1,2 +1,5 @@
 . ${srcdir}/emulparams/elf32ppc.sh
 . ${srcdir}/emulparams/elf_fbsd.sh
+
+OUTPUT_FORMAT="elf32-powerpc-freebsd"
+
diff --git a/ld/emulparams/elf64ppc_fbsd.sh b/ld/emulparams/elf64ppc_fbsd.sh
new file mode 100644 (file)
index 0000000..e1b09ca
--- /dev/null
@@ -0,0 +1,6 @@
+. ${srcdir}/emulparams/elf64ppc.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+
+OUTPUT_FORMAT="elf64-powerpc-freebsd"
+DEFAULT_PLT_STATIC_CHAIN=1
+
index 80143a8..9c352ee 100644 (file)
@@ -62,7 +62,7 @@ static int no_multi_toc = 0;
 static int no_toc_sort = 0;
 
 /* Set if PLT call stubs should load r11.  */
-static int plt_static_chain = 0;
+static int plt_static_chain = ${DEFAULT_PLT_STATIC_CHAIN-0};
 
 /* Whether to emit symbols for stubs.  */
 static int emit_stub_syms = -1;