* config.bfd: Add powerpc64 target. Add powerpc64 vectors to

targ64_selvecs for 32 bit powerpc targets.
	* Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
	(BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
	Run "make dep-am".
	* Makefile.in: Regenerate.
	* configure.in: Add elf64_powerpc vecs.
	* configure: Regenerate.
	* cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
	* elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
	* targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
	* elf64-ppc.c: New file.
	* reloc.c: Add powerpc64 relocs.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
This commit is contained in:
Alan Modra 2001-08-27 10:22:03 +00:00
parent aa91b392b3
commit 5bd4f1692e
13 changed files with 3965 additions and 34 deletions

View file

@ -1,3 +1,24 @@
2001-08-27 Linus Nordberg <linus@swox.se>
Torbjorn Granlund <tege@swox.com>
Staffan Ulfberg <staffanu@swox.se>
Alan Modra <amodra@bigpond.net.au>
* config.bfd: Add powerpc64 target. Add powerpc64 vectors to
targ64_selvecs for 32 bit powerpc targets.
* Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
(BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
Run "make dep-am".
* Makefile.in: Regenerate.
* configure.in: Add elf64_powerpc vecs.
* configure: Regenerate.
* cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
* elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
* targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
* elf64-ppc.c: New file.
* reloc.c: Add powerpc64 relocs.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
2001-08-27 Andreas Schwab <schwab@suse.de>
* elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the

View file

@ -426,6 +426,7 @@ BFD64_BACKENDS = \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
@ -444,6 +445,7 @@ BFD64_BACKENDS_CFILES = \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
elf64-ppc.c \
elf64-s390.c \
elf64-sparc.c \
elf64.c \
@ -919,9 +921,9 @@ coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
$(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
coffswap.h
coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
@ -1097,7 +1099,7 @@ elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
$(INCDIR)/libiberty.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
@ -1230,14 +1232,15 @@ pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
$(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
coffcode.h peicode.h libpei.h
pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
$(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
@ -1327,6 +1330,10 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
ecoffswap.h elf64-target.h
elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \

View file

@ -114,6 +114,7 @@ WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
bfd_default_target_size = @bfd_default_target_size@
bfd_machines = @bfd_machines@
l = @l@
tdefaults = @tdefaults@
@ -551,6 +552,7 @@ BFD64_BACKENDS = \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
elf64-ppc.lo \
elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
@ -570,6 +572,7 @@ BFD64_BACKENDS_CFILES = \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
elf64-ppc.c \
elf64-s390.c \
elf64-sparc.c \
elf64.c \
@ -1457,9 +1460,9 @@ coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
$(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
coffswap.h
coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
@ -1635,7 +1638,7 @@ elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
$(INCDIR)/libiberty.h elf32-target.h
elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
@ -1768,14 +1771,15 @@ pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
$(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
coffcode.h peicode.h libpei.h
pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
$(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
@ -1865,6 +1869,10 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
ecoffswap.h elf64-target.h
elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \

View file

@ -1870,10 +1870,12 @@ The 24-bit relocation is used in some Intel 960 configurations. */
BFD_RELOC_HI16_GOTOFF,
BFD_RELOC_HI16_S_GOTOFF,
BFD_RELOC_8_GOTOFF,
BFD_RELOC_64_PLT_PCREL,
BFD_RELOC_32_PLT_PCREL,
BFD_RELOC_24_PLT_PCREL,
BFD_RELOC_16_PLT_PCREL,
BFD_RELOC_8_PLT_PCREL,
BFD_RELOC_64_PLTOFF,
BFD_RELOC_32_PLTOFF,
BFD_RELOC_16_PLTOFF,
BFD_RELOC_LO16_PLTOFF,
@ -2183,6 +2185,29 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_PPC_EMB_RELST_HA,
BFD_RELOC_PPC_EMB_BIT_FLD,
BFD_RELOC_PPC_EMB_RELSDA,
BFD_RELOC_PPC64_HIGHER,
BFD_RELOC_PPC64_HIGHER_S,
BFD_RELOC_PPC64_HIGHEST,
BFD_RELOC_PPC64_HIGHEST_S,
BFD_RELOC_PPC64_TOC16_LO,
BFD_RELOC_PPC64_TOC16_HI,
BFD_RELOC_PPC64_TOC16_HA,
BFD_RELOC_PPC64_TOC,
BFD_RELOC_PPC64_PLTGOT16 ,
BFD_RELOC_PPC64_PLTGOT16_LO,
BFD_RELOC_PPC64_PLTGOT16_HI,
BFD_RELOC_PPC64_PLTGOT16_HA,
BFD_RELOC_PPC64_ADDR16_DS,
BFD_RELOC_PPC64_ADDR16_LO_DS,
BFD_RELOC_PPC64_GOT16_DS,
BFD_RELOC_PPC64_GOT16_LO_DS,
BFD_RELOC_PPC64_PLT16_LO_DS,
BFD_RELOC_PPC64_SECTOFF_DS,
BFD_RELOC_PPC64_SECTOFF_LO_DS,
BFD_RELOC_PPC64_TOC16_DS,
BFD_RELOC_PPC64_TOC16_LO_DS,
BFD_RELOC_PPC64_PLTGOT16_DS,
BFD_RELOC_PPC64_PLTGOT16_LO_DS,
/* IBM 370/390 relocations */
BFD_RELOC_I370_D12,

View file

@ -734,12 +734,21 @@ case "${targ}" in
targ_defvec=rs6000coff64_vec
targ_selvecs="rs6000coff_vec"
;;
powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux*)
targ_defvec=bfd_elf64_powerpc_vec
targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec"
;;
powerpc64le-*-elf* | powerpcle-*-elf64*)
targ_defvec=bfd_elf64_powerpcle_vec
targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec"
;;
#endif
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
powerpc-*-chorus* | powerpc-*-vxworks*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
powerpc-*-macos* | powerpc-*-mpw*)
targ_defvec=pmac_xcoff_vec
@ -753,6 +762,7 @@ case "${targ}" in
powerpcle-*-rtems*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)

28
bfd/configure vendored
View file

@ -5979,6 +5979,10 @@ do
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"
target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"
target_size=64 ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
@ -6192,17 +6196,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:6196: checking for $ac_hdr" >&5
echo "configure:6200: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6201 "configure"
#line 6205 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:6206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:6210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -6231,12 +6235,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6235: checking for $ac_func" >&5
echo "configure:6239: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6240 "configure"
#line 6244 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -6259,7 +6263,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -6284,7 +6288,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
echo "configure:6288: checking for working mmap" >&5
echo "configure:6292: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -6292,7 +6296,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
#line 6296 "configure"
#line 6300 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@ -6432,7 +6436,7 @@ main()
}
EOF
if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:6440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@ -6457,12 +6461,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:6461: checking for $ac_func" >&5
echo "configure:6465: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 6466 "configure"
#line 6470 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -6485,7 +6489,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:6489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else

View file

@ -552,6 +552,10 @@ do
bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";;
bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"
target_size=64 ;;
bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"
target_size=64 ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;

View file

@ -1,5 +1,5 @@
/* BFD PowerPC CPU definition
Copyright 1994, 1995, 1996, 2000 Free Software Foundation, Inc.
Copyright 1994, 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@ -128,7 +128,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc",
"powerpc:620",
3,
false, /* not the default */
BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[6]
@ -229,7 +229,7 @@ const bfd_arch_info_type bfd_powerpc_arch =
"powerpc",
"powerpc:common",
3,
true, /* the default */
BFD_DEFAULT_TARGET_SIZE != 64, /* default for 32 bit target */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[0]

View file

@ -3393,7 +3393,10 @@ prep_headers (abfd)
i_ehdrp->e_machine = EM_PARISC;
break;
case bfd_arch_powerpc:
i_ehdrp->e_machine = EM_PPC;
if (bed->s->arch_size == 64)
i_ehdrp->e_machine = EM_PPC64;
else
i_ehdrp->e_machine = EM_PPC;
break;
case bfd_arch_alpha:
i_ehdrp->e_machine = EM_ALPHA;

3768
bfd/elf64-ppc.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -628,10 +628,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_HI16_GOTOFF",
"BFD_RELOC_HI16_S_GOTOFF",
"BFD_RELOC_8_GOTOFF",
"BFD_RELOC_64_PLT_PCREL",
"BFD_RELOC_32_PLT_PCREL",
"BFD_RELOC_24_PLT_PCREL",
"BFD_RELOC_16_PLT_PCREL",
"BFD_RELOC_8_PLT_PCREL",
"BFD_RELOC_64_PLTOFF",
"BFD_RELOC_32_PLTOFF",
"BFD_RELOC_16_PLTOFF",
"BFD_RELOC_LO16_PLTOFF",
@ -811,6 +813,29 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_PPC_EMB_RELST_HA",
"BFD_RELOC_PPC_EMB_BIT_FLD",
"BFD_RELOC_PPC_EMB_RELSDA",
"BFD_RELOC_PPC64_HIGHER",
"BFD_RELOC_PPC64_HIGHER_S",
"BFD_RELOC_PPC64_HIGHEST",
"BFD_RELOC_PPC64_HIGHEST_S",
"BFD_RELOC_PPC64_TOC16_LO",
"BFD_RELOC_PPC64_TOC16_HI",
"BFD_RELOC_PPC64_TOC16_HA",
"BFD_RELOC_PPC64_TOC",
"BFD_RELOC_PPC64_PLTGOT16 ",
"BFD_RELOC_PPC64_PLTGOT16_LO",
"BFD_RELOC_PPC64_PLTGOT16_HI",
"BFD_RELOC_PPC64_PLTGOT16_HA",
"BFD_RELOC_PPC64_ADDR16_DS",
"BFD_RELOC_PPC64_ADDR16_LO_DS",
"BFD_RELOC_PPC64_GOT16_DS",
"BFD_RELOC_PPC64_GOT16_LO_DS",
"BFD_RELOC_PPC64_PLT16_LO_DS",
"BFD_RELOC_PPC64_SECTOFF_DS",
"BFD_RELOC_PPC64_SECTOFF_LO_DS",
"BFD_RELOC_PPC64_TOC16_DS",
"BFD_RELOC_PPC64_TOC16_LO_DS",
"BFD_RELOC_PPC64_PLTGOT16_DS",
"BFD_RELOC_PPC64_PLTGOT16_LO_DS",
"BFD_RELOC_I370_D12",
"BFD_RELOC_CTOR",
"BFD_RELOC_ARM_PCREL_BRANCH",

View file

@ -1680,6 +1680,8 @@ ENUMX
BFD_RELOC_HI16_S_GOTOFF
ENUMX
BFD_RELOC_8_GOTOFF
ENUMX
BFD_RELOC_64_PLT_PCREL
ENUMX
BFD_RELOC_32_PLT_PCREL
ENUMX
@ -1688,6 +1690,8 @@ ENUMX
BFD_RELOC_16_PLT_PCREL
ENUMX
BFD_RELOC_8_PLT_PCREL
ENUMX
BFD_RELOC_64_PLTOFF
ENUMX
BFD_RELOC_32_PLTOFF
ENUMX
@ -2216,6 +2220,52 @@ ENUMX
BFD_RELOC_PPC_EMB_BIT_FLD
ENUMX
BFD_RELOC_PPC_EMB_RELSDA
ENUMX
BFD_RELOC_PPC64_HIGHER
ENUMX
BFD_RELOC_PPC64_HIGHER_S
ENUMX
BFD_RELOC_PPC64_HIGHEST
ENUMX
BFD_RELOC_PPC64_HIGHEST_S
ENUMX
BFD_RELOC_PPC64_TOC16_LO
ENUMX
BFD_RELOC_PPC64_TOC16_HI
ENUMX
BFD_RELOC_PPC64_TOC16_HA
ENUMX
BFD_RELOC_PPC64_TOC
ENUMX
BFD_RELOC_PPC64_PLTGOT16
ENUMX
BFD_RELOC_PPC64_PLTGOT16_LO
ENUMX
BFD_RELOC_PPC64_PLTGOT16_HI
ENUMX
BFD_RELOC_PPC64_PLTGOT16_HA
ENUMX
BFD_RELOC_PPC64_ADDR16_DS
ENUMX
BFD_RELOC_PPC64_ADDR16_LO_DS
ENUMX
BFD_RELOC_PPC64_GOT16_DS
ENUMX
BFD_RELOC_PPC64_GOT16_LO_DS
ENUMX
BFD_RELOC_PPC64_PLT16_LO_DS
ENUMX
BFD_RELOC_PPC64_SECTOFF_DS
ENUMX
BFD_RELOC_PPC64_SECTOFF_LO_DS
ENUMX
BFD_RELOC_PPC64_TOC16_DS
ENUMX
BFD_RELOC_PPC64_TOC16_LO_DS
ENUMX
BFD_RELOC_PPC64_PLTGOT16_DS
ENUMX
BFD_RELOC_PPC64_PLTGOT16_LO_DS
ENUMDOC
Power(rs6000) and PowerPC relocations.

View file

@ -571,6 +571,8 @@ extern const bfd_target bfd_elf64_little_generic_vec;
extern const bfd_target bfd_elf64_littlemips_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
extern const bfd_target bfd_elf64_powerpc_vec;
extern const bfd_target bfd_elf64_powerpcle_vec;
extern const bfd_target bfd_elf64_s390_vec;
extern const bfd_target bfd_elf64_sparc_vec;
extern const bfd_target bfd_elf64_x86_64_vec;
@ -782,6 +784,10 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
#ifdef BFD64
&bfd_elf64_powerpc_vec,
&bfd_elf64_powerpcle_vec,
#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_v850_vec,
&bfd_elf32_fr30_vec,