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]

Re: ARM as crash


Hi Shaun,

$ echo 'bl 0' >foo.s
$ arm-elf-as foo.s
Segmentation fault

Oops. Fixed by applying the attached patch (which I am about to check in).


Cheers
  Nick

gas/ChangeLog

2005-08-29 Nick Clifton <nickc@redhat.com>

	* write.c (generic_force_reloc): Do not call S_FORCE_RELOC if
	there is no symbol.
Index: gas/write.c
===================================================================
RCS file: /cvs/src/src/gas/write.c,v
retrieving revision 1.94
diff -c -3 -p -r1.94 write.c
*** gas/write.c	18 Aug 2005 09:26:16 -0000	1.94
--- gas/write.c	29 Aug 2005 16:28:15 -0000
*************** generic_force_reloc (fixS *fix)
*** 316,321 ****
--- 316,324 ----
        || fix->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
      return 1;
  
+   if (fix->fx_addsy == NULL)
+     return 0;
+ 
    return S_FORCE_RELOC (fix->fx_addsy, fix->fx_subsy == NULL);
  }
  

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