mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
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.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2001-02-13 Jim Wilson <wilson@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2001-02-13 Ian Lance Taylor <ian@zembu.com>
|
2001-02-13 Ian Lance Taylor <ian@zembu.com>
|
||||||
|
|
||||||
* write.c (is_dnrange): Stop as soon as the address becomes
|
* write.c (is_dnrange): Stop as soon as the address becomes
|
||||||
|
@ -5165,7 +5165,10 @@ operand_match (idesc, index, e)
|
|||||||
|
|
||||||
case O_symbol:
|
case O_symbol:
|
||||||
fix = CURR_SLOT.fixup + CURR_SLOT.num_fixups;
|
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->opnd = idesc->operands[index];
|
||||||
fix->expr = *e;
|
fix->expr = *e;
|
||||||
fix->is_pcrel = 1;
|
fix->is_pcrel = 1;
|
||||||
@ -9804,16 +9807,15 @@ md_apply_fix3 (fix, valuep, seg)
|
|||||||
}
|
}
|
||||||
if (fix->fx_addsy)
|
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,
|
as_bad_where (fix->fx_file, fix->fx_line,
|
||||||
"%s must have a constant value",
|
"%s must have a constant value",
|
||||||
elf64_ia64_operands[fix->tc_fix_data.opnd].desc);
|
elf64_ia64_operands[fix->tc_fix_data.opnd].desc);
|
||||||
break;
|
fix->fx_done = 1;
|
||||||
|
return 1;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ??? This is a hack copied from tc-i386.c to make PCREL relocs
|
/* ??? This is a hack copied from tc-i386.c to make PCREL relocs
|
||||||
|
@ -252,9 +252,12 @@ typedef struct unwind_record
|
|||||||
True if we are willing to perform this relocation while building
|
True if we are willing to perform this relocation while building
|
||||||
the .o file. This is only used for pcrel relocations. */
|
the .o file. This is only used for pcrel relocations. */
|
||||||
|
|
||||||
|
/* If the reloc type is BFD_RELOC_UNUSED, then this is for a TAG13/TAG13b field
|
||||||
|
which has no external reloc, so we must resolve the value now. */
|
||||||
|
|
||||||
#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
|
#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
|
||||||
((FIX)->fx_addsy == NULL \
|
((FIX)->fx_addsy == NULL \
|
||||||
|| (FIX)->fx_r_type == 0 \
|
|| (FIX)->fx_r_type == BFD_RELOC_UNUSED \
|
||||||
|| (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
|
|| (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
|
||||||
&& ! S_IS_WEAK ((FIX)->fx_addsy) \
|
&& ! S_IS_WEAK ((FIX)->fx_addsy) \
|
||||||
&& S_IS_DEFINED ((FIX)->fx_addsy) \
|
&& S_IS_DEFINED ((FIX)->fx_addsy) \
|
||||||
|
Reference in New Issue
Block a user