Browse Source

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.
binutils-2_37-branch
Alan Modra 5 years ago
parent
commit
d71893802f
  1. 8
      gas/ChangeLog
  2. 10
      gas/config/tc-ia64.c
  3. 2
      gas/testsuite/gas/ia64/reloc-mlx.d

8
gas/ChangeLog

@ -1,3 +1,11 @@
2021-05-22 Alan Modra <amodra@gmail.com>
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.
2021-05-20 Sergey Belyashov <sergey.belyashov@gmail.com>
* config/tc-z80.c (emit_data_val): Warn on constant overflow.

10
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,

2
gas/testsuite/gas/ia64/reloc-mlx.d

@ -5,4 +5,4 @@
RELOCATION RECORDS FOR \[\.text\]:
OFFSET[[:space:]]+TYPE[[:space:]]+VALUE[[:space:]]*
0+1[[:space:]]+PCREL60B[[:space:]]+bar
0+[12][[:space:]]+PCREL60B[[:space:]]+bar

Loading…
Cancel
Save