aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-09-05 00:01:18 +0000
committerAlan Modra <amodra@gmail.com>2002-09-05 00:01:18 +0000
commita161fe53205dbc69d42f5a123b2b04346724b2de (patch)
treebb28dde4f0deee90db9e7a8247fb82dd2e4933fe /gas/config/tc-arm.c
parent8f8429869e9a245fe48b8c69bde2bffa3d6c7734 (diff)
downloadgdb-a161fe53205dbc69d42f5a123b2b04346724b2de.zip
gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.tar.gz
gdb-a161fe53205dbc69d42f5a123b2b04346724b2de.tar.bz2
gas reloc rewrite.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r--gas/config/tc-arm.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index d2d7034..bf34dc9 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -10010,10 +10010,6 @@ md_apply_fix3 (fixP, valP, seg)
break;
#endif
- case BFD_RELOC_ARM_GOTPC:
- md_number_to_chars (buf, value, 4);
- break;
-
case BFD_RELOC_ARM_CP_OFF_IMM:
sign = value >= 0;
if (value < -1023 || value > 1023 || (value & 3))
@@ -11390,7 +11386,7 @@ arm_canonicalize_symbol_name (name)
return name;
}
-boolean
+void
arm_validate_fix (fixP)
fixS * fixP;
{
@@ -11404,10 +11400,7 @@ arm_validate_fix (fixP)
&& ! THUMB_IS_FUNC (fixP->fx_addsy))
{
fixP->fx_addsy = find_real_start (fixP->fx_addsy);
- return true;
}
-
- return false;
}
#ifdef OBJ_COFF
@@ -11447,13 +11440,6 @@ arm_fix_adjustable (fixP)
if (fixP->fx_addsy == NULL)
return 1;
- /* Prevent all adjustments to global symbols. */
- if (S_IS_EXTERN (fixP->fx_addsy))
- return 0;
-
- if (S_IS_WEAK (fixP->fx_addsy))
- return 0;
-
if (THUMB_IS_FUNC (fixP->fx_addsy)
&& fixP->fx_subsy == NULL)
return 0;
@@ -11463,6 +11449,12 @@ arm_fix_adjustable (fixP)
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
+ /* Don't allow symbols to be discarded on GOT related relocs. */
+ if (fixP->fx_r_type == BFD_RELOC_ARM_PLT32
+ || fixP->fx_r_type == BFD_RELOC_ARM_GOT32
+ || fixP->fx_r_type == BFD_RELOC_ARM_GOTOFF)
+ return 0;
+
return 1;
}
@@ -11505,7 +11497,7 @@ arm_force_relocation (fixp)
|| fixp->fx_r_type == BFD_RELOC_THUMB_PCREL_BRANCH23)
return 1;
- return 0;
+ return S_FORCE_RELOC (fixp->fx_addsy);
}
static bfd_reloc_code_real_type