aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ia64.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@tuliptree.org>2001-02-14 01:46:10 +0000
committerJim Wilson <wilson@tuliptree.org>2001-02-14 01:46:10 +0000
commitfa1cb89ccc52f3e55a7de0d94b100cf3694f273e (patch)
tree904524812bcc43e4aa22817516b11155388789b6 /gas/config/tc-ia64.c
parent6757257fb58bd0b5bd75e2d9230aae7da4559618 (diff)
downloadgdb-fa1cb89ccc52f3e55a7de0d94b100cf3694f273e.zip
gdb-fa1cb89ccc52f3e55a7de0d94b100cf3694f273e.tar.gz
gdb-fa1cb89ccc52f3e55a7de0d94b100cf3694f273e.tar.bz2
Address comment from Richard about relocs always needing a type.
* config/tc-ia64.c (operand_match, case TAG13): Make a BFD_RELOC_UNUSED reloc instead of a 0 reloc. (md_apply_fix3): Check for BFD_RELOC_UNUSED instead of 0, and mark it as done. * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Likewise.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r--gas/config/tc-ia64.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 8f82739..df566e2 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -5165,7 +5165,10 @@ operand_match (idesc, index, e)
case O_symbol:
fix = CURR_SLOT.fixup + CURR_SLOT.num_fixups;
- fix->code = ia64_gen_real_reloc_type (e->X_op_symbol, 0);
+ /* There are no external relocs for TAG13/TAG13b fields, so we
+ create a dummy reloc. This will not live past md_apply_fix3. */
+ fix->code = BFD_RELOC_UNUSED;
+ fix->code = ia64_gen_real_reloc_type (e->X_op_symbol, fix->code);
fix->opnd = idesc->operands[index];
fix->expr = *e;
fix->is_pcrel = 1;
@@ -9804,16 +9807,15 @@ md_apply_fix3 (fix, valuep, seg)
}
if (fix->fx_addsy)
{
- switch (fix->fx_r_type)
+ if (fix->fx_r_type == (int) BFD_RELOC_UNUSED)
{
- case 0:
+ /* This must be a TAG13 or TAG13b operand. There are no external
+ relocs defined for them, so we must give an error. */
as_bad_where (fix->fx_file, fix->fx_line,
"%s must have a constant value",
elf64_ia64_operands[fix->tc_fix_data.opnd].desc);
- break;
-
- default:
- break;
+ fix->fx_done = 1;
+ return 1;
}
/* ??? This is a hack copied from tc-i386.c to make PCREL relocs