This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ARM as crash
- From: Nick Clifton <nickc at redhat dot com>
- To: Shaun Jackman <sjackman at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 29 Aug 2005 17:37:10 +0100
- Subject: Re: ARM as crash
- References: <7f45d9390508260909e8bb798@mail.gmail.com>
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);
}