[PATCH] ARM VFP11 erratum fix

Mark Shinwell shinwell@codesourcery.com
Sat May 5 13:30:00 GMT 2007


The recent patch relating to the ARM VFP11 erratum could cause
crashes of the linker when non-ELF objects were involved in the
link.  It is fixed by this patch.

OK to apply?

Mark

--


2007-05-05  Mark Shinwell  <shinwell@codesourcery.com>

	bfd/
	* elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
	attempt to scan if the bfd doesn't correspond to an ELF image.


Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.112
diff -U3 -p -r1.112 elf32-arm.c
--- bfd/elf32-arm.c     3 May 2007 19:27:14 -0000       1.112
+++ bfd/elf32-arm.c     5 May 2007 13:27:46 -0000
@@ -3648,6 +3648,10 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a

    if (globals->vfp11_fix == BFD_ARM_VFP11_FIX_NONE)
      return TRUE;
+
+  /* Skip if this bfd does not correspond to an ELF image.  */
+  if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
+    return TRUE;

    for (sec = abfd->sections; sec != NULL; sec = sec->next)
      {
@@ -3819,7 +3823,11 @@ bfd_elf32_arm_vfp11_fix_veneer_locations

    if (link_info->relocatable)
      return;
-
+
+  /* Skip if this bfd does not correspond to an ELF image.  */
+  if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
+    return;
+
    globals = elf32_arm_hash_table (link_info);

    tmp_name = bfd_malloc ((bfd_size_type) strlen



More information about the Binutils mailing list