diff options
author | dim <dim@FreeBSD.org> | 2010-12-05 20:24:22 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-12-05 20:24:22 +0000 |
commit | fd23e4897986413343c8dfa900bb16a8bb8004a5 (patch) | |
tree | 3bb64497d550391aedbb3bf5665e1d3c01a27e5e | |
parent | ba5e9b3444d6c09a3cd75895b137e5ffc75077b5 (diff) | |
download | FreeBSD-src-fd23e4897986413343c8dfa900bb16a8bb8004a5.zip FreeBSD-src-fd23e4897986413343c8dfa900bb16a8bb8004a5.tar.gz |
For ia64, add a proper 'elf64-ia64-freebsd' output format to BFD, so the
ELF branding for FreeBSD is done in the same way as amd64, i386 and
sparc. Something similar should probably also be done for arm, mips and
powerpc.
-rw-r--r-- | contrib/binutils/bfd/elfxx-ia64.c | 20 | ||||
-rw-r--r-- | contrib/binutils/bfd/targets.c | 1 | ||||
-rw-r--r-- | contrib/binutils/gas/config/tc-ia64.c | 4 | ||||
-rw-r--r-- | contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh | 1 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/libbfd/Makefile.ia64 | 5 | ||||
-rw-r--r-- | sys/boot/ia64/efi/ldscript.ia64 | 2 | ||||
-rw-r--r-- | sys/boot/ia64/ski/ldscript.ia64 | 2 | ||||
-rw-r--r-- | sys/conf/ldscript.ia64 | 2 |
8 files changed, 31 insertions, 6 deletions
diff --git a/contrib/binutils/bfd/elfxx-ia64.c b/contrib/binutils/bfd/elfxx-ia64.c index 68f2010..e797212 100644 --- a/contrib/binutils/bfd/elfxx-ia64.c +++ b/contrib/binutils/bfd/elfxx-ia64.c @@ -5909,6 +5909,26 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, #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/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c index 04b52df..71c8f4b 100644 --- a/contrib/binutils/bfd/targets.c +++ b/contrib/binutils/bfd/targets.c @@ -594,6 +594,7 @@ extern const bfd_target bfd_elf32_i860_little_vec; extern const bfd_target bfd_elf32_i860_vec; extern const bfd_target bfd_elf32_i960_vec; extern const bfd_target bfd_elf32_ia64_big_vec; +extern const bfd_target bfd_elf64_ia64_freebsd_vec; extern const bfd_target bfd_elf32_ia64_hpux_big_vec; extern const bfd_target bfd_elf32_ip2k_vec; extern const bfd_target bfd_elf32_iq2000_vec; diff --git a/contrib/binutils/gas/config/tc-ia64.c b/contrib/binutils/gas/config/tc-ia64.c index 5ed9ba8..2279c99 100644 --- a/contrib/binutils/gas/config/tc-ia64.c +++ b/contrib/binutils/gas/config/tc-ia64.c @@ -7704,8 +7704,10 @@ ia64_target_format () else { if (md.flags & EF_IA_64_ABI64) -#ifdef TE_AIX50 +#if defined(TE_AIX50) return "elf64-ia64-aix-little"; +#elif defined(TE_FreeBSD) + return "elf64-ia64-freebsd"; #else return "elf64-ia64-little"; #endif diff --git a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh index ab7e78f..a7e2675 100644 --- a/contrib/binutils/ld/emulparams/elf64_ia64_fbsd.sh +++ b/contrib/binutils/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" diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.ia64 b/gnu/usr.bin/binutils/libbfd/Makefile.ia64 index 22e310c..2e489bc 100644 --- a/gnu/usr.bin/binutils/libbfd/Makefile.ia64 +++ b/gnu/usr.bin/binutils/libbfd/Makefile.ia64 @@ -1,6 +1,6 @@ # $FreeBSD$ -DEFAULT_VECTOR= bfd_elf64_ia64_little_vec +DEFAULT_VECTOR= bfd_elf64_ia64_freebsd_vec SRCS+= cofflink.c \ cpu-ia64.c \ @@ -18,13 +18,14 @@ SRCS+= cofflink.c \ VECS+= ${DEFAULT_VECTOR} \ bfd_efi_app_ia64_vec \ + bfd_elf64_ia64_little_vec \ bfd_elf64_ia64_big_vec \ bfd_elf64_little_generic_vec bfd_elf64_big_generic_vec \ bfd_elf32_little_generic_vec bfd_elf32_big_generic_vec CLEANFILES+= elf64-ia64.c pepigen.c pex64igen.c -elf64-ia64.c: elf-fbsd-brand.c elfxx-ia64.c +elf64-ia64.c: elfxx-ia64.c sed -e s/NN/64/g ${.ALLSRC} > ${.TARGET} pepigen.c: peXXigen.c diff --git a/sys/boot/ia64/efi/ldscript.ia64 b/sys/boot/ia64/efi/ldscript.ia64 index 8c3a891..c30f3c5 100644 --- a/sys/boot/ia64/efi/ldscript.ia64 +++ b/sys/boot/ia64/efi/ldscript.ia64 @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little") +OUTPUT_FORMAT("elf64-ia64-freebsd", "elf64-ia64-freebsd", "elf64-ia64-freebsd") OUTPUT_ARCH(ia64) ENTRY(_start_plabel) SECTIONS diff --git a/sys/boot/ia64/ski/ldscript.ia64 b/sys/boot/ia64/ski/ldscript.ia64 index 973b0af..4027807 100644 --- a/sys/boot/ia64/ski/ldscript.ia64 +++ b/sys/boot/ia64/ski/ldscript.ia64 @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little") +OUTPUT_FORMAT("elf64-ia64-freebsd", "elf64-ia64-freebsd", "elf64-ia64-freebsd") OUTPUT_ARCH(ia64) ENTRY(_start) SECTIONS diff --git a/sys/conf/ldscript.ia64 b/sys/conf/ldscript.ia64 index 8dc0368..57b17d6 100644 --- a/sys/conf/ldscript.ia64 +++ b/sys/conf/ldscript.ia64 @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little", "elf64-ia64-little") +OUTPUT_FORMAT("elf64-ia64-freebsd", "elf64-ia64-freebsd", "elf64-ia64-freebsd") OUTPUT_ARCH(ia64) ENTRY(__start) SEARCH_DIR(/usr/lib); |