diff options
author | Alan Modra <amodra@gmail.com> | 2021-05-22 12:59:36 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-05-22 17:23:24 +0930 |
commit | d71893802fe424e3123ced8c6ed158958487f716 (patch) | |
tree | 408be592b450a42e359416a5efc44c806e07660c | |
parent | 574ec1084d28ee56710ea48eb072e5c47226d247 (diff) | |
download | fsf-binutils-gdb-d71893802fe424e3123ced8c6ed158958487f716.zip fsf-binutils-gdb-d71893802fe424e3123ced8c6ed158958487f716.tar.gz fsf-binutils-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.
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-ia64.c | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/ia64/reloc-mlx.d | 2 |
3 files changed, 17 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index b9a59b6..cf135d9 100644 --- a/gas/ChangeLog +++ b/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. 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, diff --git a/gas/testsuite/gas/ia64/reloc-mlx.d b/gas/testsuite/gas/ia64/reloc-mlx.d index cd210f6..1583872 100644 --- a/gas/testsuite/gas/ia64/reloc-mlx.d +++ b/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 |