summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-12-05 20:24:22 +0000
committerdim <dim@FreeBSD.org>2010-12-05 20:24:22 +0000
commitfd23e4897986413343c8dfa900bb16a8bb8004a5 (patch)
tree3bb64497d550391aedbb3bf5665e1d3c01a27e5e /contrib/binutils/bfd
parentba5e9b3444d6c09a3cd75895b137e5ffc75077b5 (diff)
downloadFreeBSD-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.
Diffstat (limited to 'contrib/binutils/bfd')
-rw-r--r--contrib/binutils/bfd/elfxx-ia64.c20
-rw-r--r--contrib/binutils/bfd/targets.c1
2 files changed, 21 insertions, 0 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;
OpenPOWER on IntegriCloud