Author: ian
Date: Sun Feb 21 14:59:24 2016
New Revision: 295857
URL: https://svnweb.freebsd.org/changeset/base/295857

Log:
  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.

Modified:
  head/contrib/binutils/bfd/elf32-arm.c

Modified: head/contrib/binutils/bfd/elf32-arm.c
==============================================================================
--- head/contrib/binutils/bfd/elf32-arm.c       Sun Feb 21 14:56:05 2016        
(r295856)
+++ head/contrib/binutils/bfd/elf32-arm.c       Sun Feb 21 14:59:24 2016        
(r295857)
@@ -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 * ab
 
   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)
     {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to