[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gas/25599] gas generates invalid PCREL60B relocation offset with br
From: |
jvb at cyberscience dot com |
Subject: |
[Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call |
Date: |
Mon, 17 May 2021 10:07:06 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25599
John Buddery <jvb at cyberscience dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvb at cyberscience dot com
--- Comment #4 from John Buddery <jvb at cyberscience dot com> ---
Here's the solution I used to fix the PCREL60B offset for HP:
--- binutils-2.36/gas/config/tc-ia64.c 2021-01-09 10:47:33.000000000 +0000
+++ binutils-2.36-snake/gas/config/tc-ia64.c 2021-05-17 10:21:40.651307362
+0100
@@ -6892,7 +6892,13 @@
for (j = 0; j < md.slot[curr].num_fixups; ++j)
{
ifix = md.slot[curr].fixup + j;
- fix = fix_new_exp (frag_now, frag_now_fix () - 16 + i, 8,
+
+ unsigned long where = frag_now_fix () - 16 + i;
+#ifdef TE_HPUX
+ if ( ifix->code == BFD_RELOC_IA64_PCREL60B ) where++;
+#endif
+
+ fix = fix_new_exp (frag_now, where, 8,
&ifix->expr, ifix->is_pcrel, ifix->code);
fix->tc_fix_data.opnd = ifix->opnd;
fix->fx_file = md.slot[curr].src_file;
I've made the change HP specific, as I'm not sure the binutils linker treats
the offset the same way, and I've no way to test.
I've tested this and it works for brl instructions in all the cases I've seen
(including a full bootstrap of gcc and a separate large project build).
I know this platform is obsoleted in 2.36, but as it's the only way to get a
working modern gcc version, it would be really helpful if this change or
something similar could be accepted.
---
John
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call,
jvb at cyberscience dot com <=
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, dave.anglin at bell dot net, 2021/05/17
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, cvs-commit at gcc dot gnu.org, 2021/05/19
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, danglin at gcc dot gnu.org, 2021/05/19
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, amodra at gmail dot com, 2021/05/20
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, jvb at cyberscience dot com, 2021/05/21
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, dave.anglin at bell dot net, 2021/05/21
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, jvb at cyberscience dot com, 2021/05/21
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, dave.anglin at bell dot net, 2021/05/21
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, dave.anglin at bell dot net, 2021/05/21
- [Bug gas/25599] gas generates invalid PCREL60B relocation offset with brl.call, cvs-commit at gcc dot gnu.org, 2021/05/22