diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 9 | ||||
-rw-r--r-- | bfd/config.bfd | 10 | ||||
-rwxr-xr-x | bfd/configure | 2 | ||||
-rw-r--r-- | bfd/configure.in | 2 | ||||
-rw-r--r-- | bfd/elf32-ppc.c | 20 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 19 | ||||
-rw-r--r-- | bfd/targets.c | 4 |
7 files changed, 66 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 95c8b8a..a05487b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,12 @@ +2011-11-21 Andreas Tobler <andreast@fgznet.ch> + + * config.bfd: Add vectors for powerpc and powerpc64-freebsd. + * configure.in (TDEFINES): Add rules for powerpc*-freebsd. + * configure: Regenerate. + * elf32-ppc.c: Add powerpc-freebsd definitions. + * elf64-ppc.c: Add powerpc64-freebsd definitions. + * targets.c: Add bits for powerpc and powerpc64-freebsd. + 2011-11-17 Philipp Thomas <philipp@thogro.org> * elf32-arm.c (elf32_thumb_to_arm_stub): Sync message so that it diff --git a/bfd/config.bfd b/bfd/config.bfd index a1fa2b6..5337ce5 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1132,6 +1132,11 @@ case "${targ}" in targ_selvecs=rs6000coff_vec want64=true ;; + powerpc64-*-freebsd*) + targ_defvec=bfd_elf64_powerpc_freebsd_vec + targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpc_vec bfd_elf32_powerpc_freebsd_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec aix5coff64_vec" + want64=true + ;; powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \ powerpc64-*-*bsd*) targ_defvec=bfd_elf64_powerpc_vec @@ -1144,6 +1149,11 @@ case "${targ}" in want64=true ;; #endif + powerpc-*-*freebsd*) + targ_defvec=bfd_elf32_powerpc_freebsd_vec + targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec ppcboot_vec" + targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec bfd_elf64_powerpc_freebsd_vec" + ;; powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \ powerpc-*-chorus*) diff --git a/bfd/configure b/bfd/configure index ec9a7f5..c679417 100755 --- a/bfd/configure +++ b/bfd/configure @@ -15263,6 +15263,7 @@ do bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_rl78_vec) tb="$tb elf32-rl78.lo $elf" ;; bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; @@ -15329,6 +15330,7 @@ do bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; 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_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; diff --git a/bfd/configure.in b/bfd/configure.in index 69ffe53..83376e5 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -762,6 +762,7 @@ do bfd_elf32_pjl_vec) tb="$tb elf32-pj.lo elf32.lo $elf";; bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; + bfd_elf32_powerpc_freebsd_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;; bfd_elf32_rl78_vec) tb="$tb elf32-rl78.lo $elf" ;; bfd_elf32_rx_le_vec) tb="$tb elf32-rx.lo elf32.lo $elf" ;; @@ -828,6 +829,7 @@ do bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;; 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_elf64_powerpc_freebsd_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_sh64_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; bfd_elf64_sh64l_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;; diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 4458f94..5263ae5 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -9129,6 +9129,24 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, #include "elf32-target.h" +/* FreeBSD Target */ + +#undef TARGET_LITTLE_SYM +#undef TARGET_LITTLE_NAME + +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM bfd_elf32_powerpc_freebsd_vec +#undef TARGET_BIG_NAME +#define TARGET_BIG_NAME "elf32-powerpc-freebsd" + +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_FREEBSD + +#undef elf32_bed +#define elf32_bed elf32_powerpc_fbsd_bed + +#include "elf32-target.h" + /* VxWorks Target */ #undef TARGET_LITTLE_SYM @@ -9139,6 +9157,8 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, #undef TARGET_BIG_NAME #define TARGET_BIG_NAME "elf32-powerpc-vxworks" +#undef ELF_OSABI + /* VxWorks uses the elf default section flags for .plt. */ static const struct bfd_elf_special_section * ppc_elf_vxworks_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 351ebc1..6f0e83e 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -13899,3 +13899,22 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, } #include "elf64-target.h" + +/* FreeBSD support */ + +#undef TARGET_LITTLE_SYM +#undef TARGET_LITTLE_NAME + +#undef TARGET_BIG_SYM +#define TARGET_BIG_SYM bfd_elf64_powerpc_freebsd_vec +#undef TARGET_BIG_NAME +#define TARGET_BIG_NAME "elf64-powerpc-freebsd" + +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_FREEBSD + +#undef elf64_bed +#define elf64_bed elf64_powerpc_fbsd_bed + +#include "elf64-target.h" + diff --git a/bfd/targets.c b/bfd/targets.c index 5f4ce9a..4cf8e8f 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -668,6 +668,7 @@ extern const bfd_target bfd_elf32_pj_vec; extern const bfd_target bfd_elf32_pjl_vec; extern const bfd_target bfd_elf32_powerpc_vec; extern const bfd_target bfd_elf32_powerpcle_vec; +extern const bfd_target bfd_elf32_powerpc_freebsd_vec; extern const bfd_target bfd_elf32_powerpc_vxworks_vec; extern const bfd_target bfd_elf32_rl78_vec; extern const bfd_target bfd_elf32_rx_le_vec; @@ -731,6 +732,7 @@ extern const bfd_target bfd_elf64_littlemips_vec; extern const bfd_target bfd_elf64_mmix_vec; extern const bfd_target bfd_elf64_powerpc_vec; extern const bfd_target bfd_elf64_powerpcle_vec; +extern const bfd_target bfd_elf64_powerpc_freebsd_vec; extern const bfd_target bfd_elf64_s390_vec; extern const bfd_target bfd_elf64_sh64_vec; extern const bfd_target bfd_elf64_sh64l_vec; @@ -1036,6 +1038,7 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf32_powerpc_vec, &bfd_elf32_powerpc_vxworks_vec, &bfd_elf32_powerpcle_vec, + &bfd_elf32_powerpc_freebsd_vec, &bfd_elf32_rl78_vec, &bfd_elf32_rx_be_vec, &bfd_elf32_rx_be_ns_vec, @@ -1099,6 +1102,7 @@ static const bfd_target * const _bfd_target_vector[] = &bfd_elf64_mmix_vec, &bfd_elf64_powerpc_vec, &bfd_elf64_powerpcle_vec, + &bfd_elf64_powerpc_freebsd_vec, &bfd_elf64_s390_vec, &bfd_elf64_sh64_vec, &bfd_elf64_sh64l_vec, |