aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sparc.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1994-09-07 23:58:32 +0000
committerKen Raeburn <raeburn@cygnus>1994-09-07 23:58:32 +0000
commitade614d5076838bda772ad9cf35a332298a8aedf (patch)
tree157893e69c949b3f48929839cde56fb8c3605725 /gas/config/tc-sparc.c
parentfa156ffebe9d1b5c11ab6291263d6136a946ace4 (diff)
downloadgdb-ade614d5076838bda772ad9cf35a332298a8aedf.zip
gdb-ade614d5076838bda772ad9cf35a332298a8aedf.tar.gz
gdb-ade614d5076838bda772ad9cf35a332298a8aedf.tar.bz2
(tc_gen_reloc): Use bfd_get_reloc_code_name in error message.
Diffstat (limited to 'gas/config/tc-sparc.c')
-rw-r--r--gas/config/tc-sparc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 2219814..5fa7d9d 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -1906,6 +1906,19 @@ md_apply_fix (fixP, value)
if (fixP->fx_r_type == BFD_RELOC_32_PCREL_S2 && fixP->fx_addsy)
val += fixP->fx_where + fixP->fx_frag->fr_address;
+#ifdef OBJ_AOUT
+ /* FIXME: More ridiculous gas reloc hacking. If we are going to
+ generate a reloc, then we just want to let the reloc addend set
+ the value. We do not want to also stuff the addend into the
+ object file. Including the addend in the object file works when
+ doing a static link, because the linker will ignore the object
+ file contents. However, the dynamic linker does not ignore the
+ object file contents. */
+ if (fixP->fx_addsy != NULL
+ && fixP->fx_r_type != BFD_RELOC_32_PCREL_S2)
+ val = 0;
+#endif
+
switch (fixP->fx_r_type)
{
case BFD_RELOC_16:
@@ -2113,8 +2126,8 @@ tc_gen_reloc (section, fixp)
if (reloc->howto == 0)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- "internal error: can't export reloc type %d",
- fixp->fx_r_type);
+ "internal error: can't export reloc type %d (`%s')",
+ fixp->fx_r_type, bfd_get_reloc_code_name (code));
return 0;
}
assert (!fixp->fx_pcrel == !reloc->howto->pc_relative);