aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-05-22 12:59:36 +0930
committerAlan Modra <amodra@gmail.com>2021-05-22 17:23:24 +0930
commitd71893802fe424e3123ced8c6ed158958487f716 (patch)
tree408be592b450a42e359416a5efc44c806e07660c /gas/config
parent574ec1084d28ee56710ea48eb072e5c47226d247 (diff)
downloadgdb-d71893802fe424e3123ced8c6ed158958487f716.zip
gdb-d71893802fe424e3123ced8c6ed158958487f716.tar.gz
gdb-d71893802fe424e3123ced8c6ed158958487f716.tar.bz2
Re: Fix offset for ia64 PCREL60B relocation on HP-UX
PR 25599 * config/tc-ia64.c (emit_one_bundle): Expand comment for HP-UX adjustment. Add assertion. * testsuite/gas/ia64/reloc-mlx.d: Pass when slot 2 specified for PCREL60B.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-ia64.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 34482eb..dd2147b 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -6892,9 +6892,15 @@ emit_one_bundle (void)
ifix = md.slot[curr].fixup + j;
where = frag_now_fix () - 16 + i;
#ifdef TE_HPUX
- /* Fix offset for PCREL60B relocation on HP-UX. */
+ /* Relocations for instructions specify the slot in the
+ bottom two bits of r_offset. The IA64 HP-UX linker
+ expects PCREL60B relocations to specify slot 2 of an
+ instruction. gas generates PCREL60B against slot 1. */
if (ifix->code == BFD_RELOC_IA64_PCREL60B)
- ++where;
+ {
+ know (i == 1);
+ ++where;
+ }
#endif
fix = fix_new_exp (frag_now, where, 8,