aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-02-27 13:16:39 +0000
committerNick Clifton <nickc@redhat.com>2004-02-27 13:16:39 +0000
commit788781757916f9a536d19950e7a3f3aaa3998d5b (patch)
treef380ea374a34080522ea3c8f468060a5e81871aa /gas
parent2e4b588910bf6c89c55a2f833c6cbdeb5f6926d0 (diff)
downloadgdb-788781757916f9a536d19950e7a3f3aaa3998d5b.zip
gdb-788781757916f9a536d19950e7a3f3aaa3998d5b.tar.gz
gdb-788781757916f9a536d19950e7a3f3aaa3998d5b.tar.bz2
Undo previous delta
Fix underlying problem by changing the order of tests of rel->howto.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-sh.c11
2 files changed, 11 insertions, 6 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index b8b3d5e..e41ed52 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-27 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-sh.c (get_operand): Revert previous delta.
+ (tc_gen_reloc): Check for an unknown reloc type before processing
+ the addend.
+
2004-02-27 Hannes Reinecke <hare@suse.de>
* config/tc-s390.c (s390_insn): Correct range check for opcode in
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index b2c3694..ca0e38d 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -1426,8 +1426,6 @@ get_operand (char **ptr, sh_operand_info *op)
if (src[0] == '#')
{
- if (! ISDIGIT (src[1]))
- as_bad (_("syntax error in #Imm"));
src++;
*ptr = parse_exp (src, op);
op->type = A_IMM;
@@ -4193,10 +4191,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
rel->addend = 0;
rel->howto = bfd_reloc_type_lookup (stdoutput, r_type);
-#ifdef OBJ_ELF
- if (rel->howto->type == R_SH_IND12W)
- rel->addend += fixp->fx_offset - 4;
-#endif
+
if (rel->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
@@ -4206,6 +4201,10 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
rel->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_32);
assert (rel->howto != NULL);
}
+#ifdef OBJ_ELF
+ else if (rel->howto->type == R_SH_IND12W)
+ rel->addend += fixp->fx_offset - 4;
+#endif
return rel;
}