From e1ba387e11b73f79c573be04e03035f547fcddbc Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Sun, 21 Feb 2016 14:59:24 +0000 Subject: [PATCH] Unconditionally set e_ident[OSABI]=ELFOSABI_FREEBSD in arm binary headers. When the armv6 support was imported from a project branch, this complex conditional logic and related #define'd values came along, but it's really not clear what the intent of it all was. The effect, however, was that OSABI was always set to zero, which is "UNIX System V ABI". Having the wrong value there causes pkg(8) to avoid looking inside arm elf binaries to determine shared-lib required/provides info for packaging. --- contrib/binutils/bfd/elf32-arm.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c index e20ccca85162..066e17e5dae1 100644 --- a/contrib/binutils/bfd/elf32-arm.c +++ b/contrib/binutils/bfd/elf32-arm.c @@ -59,13 +59,6 @@ #define elf_info_to_howto 0 #define elf_info_to_howto_rel elf32_arm_info_to_howto -#define ARM_ELF_ABI_VERSION 0 -#ifdef __FreeBSD__ -#define ARM_ELF_OS_ABI_VERSION ELFOSABI_FREEBSD -#else -#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM -#endif - static struct elf_backend_data elf32_arm_vxworks_bed; /* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g. @@ -9377,11 +9370,8 @@ elf32_arm_post_process_headers (bfd * abfd, struct bfd_link_info * link_info ATT i_ehdrp = elf_elfheader (abfd); - if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_UNKNOWN) - i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION; - else - i_ehdrp->e_ident[EI_OSABI] = 0; - i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION; + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD; + i_ehdrp->e_ident[EI_ABIVERSION] = 0; if (link_info) {