bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/25599] gas generates invalid PCREL60B relocation offset with br


From: amodra at gmail dot com
Subject: [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call
Date: Fri, 21 May 2021 01:16:17 +0000

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

--- Comment #8 from Alan Modra <amodra at gmail dot com> ---
This patch caused a failure in the gas testsuite.
ia64-hpux  +FAIL: ia64 mlx reloc

Investigating how this testsuite failure should be fixed, I took a look at the
ia64 abi and found that the bottom two bits of r_offset for relocations
applying to instructions encode a slot number.  So the comment in the patch
really ought to talk about slot numbers rather than "offset" to better explain
what is going on.  Furthermore, PCREL60B applies to slot 1 and slot 2, so it
seems wrong to specify slot 2 for PCREL60B.  If that really is needed the
comment ought to say something about a workaround for an ia64-hpux linker bug,
I think.  Note that there are a number of relocations with form
instruction-immediate64.  Like the form instruction-immediate60 for PCREL60B
those also apply to slot 1 and slot 2.  It looks like gas emits a slot 1
encoded offset for those.  Is that correct for ia64-hpux?

Also, if I'm correct in my analysis, what happens when/if the ia64-hpux linker
is fixed?  I'm inclined to think the gas patch should not have been applied,
the bugzilla subject line is wrong, and the reporter should have instead
pursued an ia64-hpux linker bug fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]