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.

Reply via email to