arm backend crash when handling incompatible input file

Roland McGrath mcgrathr@google.com
Mon Dec 17 19:15:00 GMT 2012


I've committed this to trunk and 2.23 branch:

bfd/
2012-12-17  Roland McGrath  <mcgrathr@google.com>
	    Alan Modra  <amodra@gmail.com>

	* elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are
	not ARM ELF.

--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -4987,6 +4987,9 @@ elf32_arm_size_stubs (bfd *output_bfd,
 	  asection *section;
 	  Elf_Internal_Sym *local_syms = NULL;

+          if (!is_arm_elf (input_bfd))
+            continue;
+
 	  num_a8_relocs = 0;

 	  /* We'll need the symbol table in a second.  */



More information about the Binutils mailing list