https://sourceware.org/bugzilla/show_bug.cgi?id=21407

--- Comment #3 from Jose E. Marchesi <jose.marchesi at oracle dot com> ---
My conclusion is that the real bug here is that GAS relaxes the CALL
instruction even if the fixup can't be fully resolved in md_apply_fix.  This
only happens in a.out targets.

This fixes it:

diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index 030e10d..c6b4476 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3585,7 +3585,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT segment
ATTRIBUTE_UNUSED)
          insn |= val & 0x3fffffff;

          /* See if we have a delay slot.  */
-         if (sparc_relax && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
+         if (sparc_relax && !fixP->fx_addsy
+             && fixP->fx_where + 8 <= fixP->fx_frag->fr_fix)
            {
 #define G0             0
 #define O7             15

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to