diff --git a/bfd/config.bfd b/bfd/config.bfd index 9b719d8..d2fe23e 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -182,7 +182,12 @@ case "${targ}" in targ_defvec=ecoffalpha_little_vec want64=true ;; - ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) + ia64*-*-freebsd* | ia64*-*-kfreebsd*-gnu) + targ_defvec=bfd_elf64_ia64_freebsd_vec + targ_selvecs="bfd_elf64_ia64_little_vec bfd_elf64_ia64_big_vec bfd_pei_ia64_vec" + want64=true + ;; + ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf*) targ_defvec=bfd_elf64_ia64_little_vec targ_selvecs="bfd_elf64_ia64_big_vec bfd_pei_ia64_vec" want64=true diff --git a/bfd/configure b/bfd/configure index 278cc1d..ad9dcc9 100755 --- a/bfd/configure +++ b/bfd/configure @@ -15169,6 +15169,7 @@ do bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; + bfd_elf64_ia64_freebsd_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;; bfd_elf64_ia64_vms_vec) tb="$tb elf64-ia64.lo elf64.lo vms-lib.lo vms-misc.lo $elf"; target_size=64 ;; diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index d42ad89..5625c44 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -6077,6 +6077,26 @@ elfNN_vms_close_and_cleanup (bfd *abfd) #include "elfNN-target.h" +/* FreeBSD support. */ + +#undef TARGET_LITTLE_SYM +#define TARGET_LITTLE_SYM bfd_elfNN_ia64_freebsd_vec +#undef TARGET_LITTLE_NAME +#define TARGET_LITTLE_NAME "elfNN-ia64-freebsd" +#undef TARGET_BIG_SYM +#undef TARGET_BIG_NAME + +#undef ELF_OSABI +#define ELF_OSABI ELFOSABI_FREEBSD + +#undef elf_backend_post_process_headers +#define elf_backend_post_process_headers _bfd_elf_set_osabi + +#undef elfNN_bed +#define elfNN_bed elfNN_ia64_fbsd_bed + +#include "elfNN-target.h" + /* HPUX-specific vectors. */ #undef TARGET_LITTLE_SYM diff --git a/bfd/targets.c b/bfd/targets.c index 3e99754..a642a8d 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -697,6 +697,7 @@ extern const bfd_target bfd_elf64_bigmips_vec; extern const bfd_target bfd_elf64_hppa_linux_vec; extern const bfd_target bfd_elf64_hppa_vec; extern const bfd_target bfd_elf64_ia64_big_vec; +extern const bfd_target bfd_elf64_ia64_freebsd_vec; extern const bfd_target bfd_elf64_ia64_hpux_big_vec; extern const bfd_target bfd_elf64_ia64_little_vec; extern const bfd_target bfd_elf64_ia64_vms_vec; diff --git a/ld/emulparams/elf64_ia64_fbsd.sh b/ld/emulparams/elf64_ia64_fbsd.sh index ab7e78f..a7e2675 100644 --- a/ld/emulparams/elf64_ia64_fbsd.sh +++ b/ld/emulparams/elf64_ia64_fbsd.sh @@ -4,3 +4,4 @@ unset DATA_ADDR unset SMALL_DATA_CTOR unset SMALL_DATA_DTOR . ${srcdir}/emulparams/elf_fbsd.sh +OUTPUT_FORMAT="elf64-ia64-freebsd"