aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-11-21 13:22:46 +0000
committerAlan Modra <amodra@gmail.com>2011-11-21 13:22:46 +0000
commitbd59d91639999e90bb9f73d679c91a9e7af7579b (patch)
treed8dca11998e91108695f219342ca411a080bd75f
parentedc1d65242992c050acce8afbd26191abf6bb433 (diff)
downloadgdb-bd59d91639999e90bb9f73d679c91a9e7af7579b.zip
gdb-bd59d91639999e90bb9f73d679c91a9e7af7579b.tar.gz
gdb-bd59d91639999e90bb9f73d679c91a9e7af7579b.tar.bz2
* 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.
-rw-r--r--ld/ChangeLog14
-rw-r--r--ld/Makefile.am5
-rw-r--r--ld/Makefile.in6
-rw-r--r--ld/configure.tgt11
-rw-r--r--ld/emulparams/elf32ppc_fbsd.sh3
-rw-r--r--ld/emulparams/elf64ppc_fbsd.sh6
-rw-r--r--ld/emultempl/ppc64elf.em2
7 files changed, 44 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 9e56b66..5d8c7f1 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 93c2832..6bfb15c 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -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}
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 698117e..a7bbe41 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -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}
diff --git a/ld/configure.tgt b/ld/configure.tgt
index 978a801..8088f2d 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -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"
diff --git a/ld/emulparams/elf32ppc_fbsd.sh b/ld/emulparams/elf32ppc_fbsd.sh
index 2bac85c..0025b61 100644
--- a/ld/emulparams/elf32ppc_fbsd.sh
+++ b/ld/emulparams/elf32ppc_fbsd.sh
@@ -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
index 0000000..e1b09ca
--- /dev/null
+++ b/ld/emulparams/elf64ppc_fbsd.sh
@@ -0,0 +1,6 @@
+. ${srcdir}/emulparams/elf64ppc.sh
+. ${srcdir}/emulparams/elf_fbsd.sh
+
+OUTPUT_FORMAT="elf64-powerpc-freebsd"
+DEFAULT_PLT_STATIC_CHAIN=1
+
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em
index 80143a8..9c352ee 100644
--- a/ld/emultempl/ppc64elf.em
+++ b/ld/emultempl/ppc64elf.em
@@ -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;