aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-11-30 14:36:21 +0000
committerNick Clifton <nickc@redhat.com>2009-11-30 14:36:21 +0000
commit974da60de16a5c1911eb4d3548f26deb48023eb9 (patch)
tree558268c7436e3a185c93ffe1d05e42f947643e71 /gas
parent88f1a8b2545defe4161731a8d3914a59759a7c0b (diff)
downloadgdb-974da60de16a5c1911eb4d3548f26deb48023eb9.zip
gdb-974da60de16a5c1911eb4d3548f26deb48023eb9.tar.gz
gdb-974da60de16a5c1911eb4d3548f26deb48023eb9.tar.bz2
PR gas/11032
* config/tc-arm.c (relax_adr): Cope with a frag with no symbol.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-arm.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 2c7c219..7f6432b 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-30 Nick Clifton <nickc@redhat.com>
+
+ PR gas/11032
+ * config/tc-arm.c (relax_adr): Cope with a frag with no symbol.
+
2009-11-19 Jan Beulich <jbeulich@novell.com>
* read.c (pseudo_set): Also call copy_symbol_attributes() for
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 7cbf6ff..0ef05df 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -4972,13 +4972,13 @@ parse_address_main (char **str, int i, int group_relocations,
{
if (skip_past_char (&p, '=') == FAIL)
{
- /* bare address - translate to PC-relative offset */
+ /* Bare address - translate to PC-relative offset. */
inst.reloc.pc_rel = 1;
inst.operands[i].reg = REG_PC;
inst.operands[i].isreg = 1;
inst.operands[i].preind = 1;
}
- /* else a load-constant pseudo op, no special treatment needed here */
+ /* Otherwise a load-constant pseudo op, no special treatment needed here. */
if (my_get_expression (&inst.reloc.exp, &p, GE_NO_PREFIX))
return PARSE_OPERAND_FAIL;
@@ -18335,7 +18335,8 @@ relax_adr (fragS *fragp, asection *sec, long stretch)
offsetT val;
/* Assume worst case for symbols not known to be in the same section. */
- if (!S_IS_DEFINED (fragp->fr_symbol)
+ if (fragp->fr_symbol == NULL
+ || !S_IS_DEFINED (fragp->fr_symbol)
|| sec != S_GET_SEGMENT (fragp->fr_symbol))
return 4;