This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][ARM] PR ld/16572: Remove EF_ARM_HASENTRY flag


The ARM ELF flag EF_ARM_HASENTRY isn't defined in the EABI and should be removed from ld and readelf (see the bugzilla entry https://sourceware.org/bugzilla/show_bug.cgi?id=16572).

This patch removes EF_ARM_HASENTRY from binutils. It's the patch by Yuri Gribov, attached to PR16572, updated for the current sources and also to remove EF_ARM_HASENTRY from include/elf/arm.h.

Tested arm-none-linux-gnueabihf and arm-none-eabi with check-gas, check-binutils and check-ld.

Ok for trunk?
Matthew

bfd/
2015-03-04  Yuri Gribov  <y.gribov@samsung.arm>

	PR ld/16572
	* elf32-arm.c (elf32_arm_final_link_relocate): Remove
	support for ELF_ARM_HASENTRY.
	(elf32_arm_print_private_bfd_data): Likewise.

binutils/
2015-03-04  Yuri Gribov  <y.gribov@samsung.arm>

	PR ld/16572
	* readelf.c: Remove support for ELF_ARM_HASENTRY.

include/
2015-03-04  Matthew Wahab  <matthew.wahab@arm.com>

	PR ld/16572
	* elf/arm.h (EF_ARM_HASENTRY): Remove.
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index c9e314e..113f4eb 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -8234,18 +8234,6 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
   if (r_type != howto->type)
     howto = elf32_arm_howto_from_type (r_type);
 
-  /* If the start address has been set, then set the EF_ARM_HASENTRY
-     flag.  Setting this more than once is redundant, but the cost is
-     not too high, and it keeps the code simple.
-
-     The test is done  here, rather than somewhere else, because the
-     start address is only set just before the final link commences.
-
-     Note - if the user deliberately sets a start address of 0, the
-     flag will not be set.  */
-  if (bfd_get_start_address (output_bfd) != 0)
-    elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY;
-
   eh = (struct elf32_arm_link_hash_entry *) h;
   sgot = globals->root.sgot;
   local_got_offsets = elf_local_got_offsets (input_bfd);
@@ -12394,10 +12382,7 @@ elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr)
   if (flags & EF_ARM_RELEXEC)
     fprintf (file, _(" [relocatable executable]"));
 
-  if (flags & EF_ARM_HASENTRY)
-    fprintf (file, _(" [has entry point]"));
-
-  flags &= ~ (EF_ARM_RELEXEC | EF_ARM_HASENTRY);
+  flags &= ~EF_ARM_RELEXEC;
 
   if (flags)
     fprintf (file, _("<Unrecognised flag bits set>"));
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 06fa8d5..d0b66ae 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2280,12 +2280,6 @@ decode_ARM_machine_flags (unsigned e_flags, char buf[])
       e_flags &= ~ EF_ARM_RELEXEC;
     }
 
-  if (e_flags & EF_ARM_HASENTRY)
-    {
-      strcat (buf, ", has entry point");
-      e_flags &= ~ EF_ARM_HASENTRY;
-    }
-
   /* Now handle EABI specific flags.  */
   switch (eabi)
     {
diff --git a/include/elf/arm.h b/include/elf/arm.h
index 7c025c1..c64e788 100644
--- a/include/elf/arm.h
+++ b/include/elf/arm.h
@@ -24,7 +24,6 @@
 
 /* Processor specific flags for the ELF header e_flags field.  */
 #define EF_ARM_RELEXEC     0x01
-#define EF_ARM_HASENTRY    0x02
 #define EF_ARM_INTERWORK   0x04
 #define EF_ARM_APCS_26     0x08
 #define EF_ARM_APCS_FLOAT  0x10

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]