https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577

--- Comment #57 from dave.anglin at bell dot net ---
On 2019-07-05 7:57 p.m., elowe at elowe dot com wrote:
> Doing some more testing on my "gprel unfixed fix" 32-bit gcc, I found out that
> it seems to be missing the 32-bit pointer swizzling needed to make 32bit
> executables on 64-bit IA-64.  The test program assembler is missing an addp4
> instruction - when I add in this instruction, my second test program also
> works.
It's not clear to me that this is necessary.  The movl instruction loads a
64-bit immediate.
In this case, it should be the offset between gp (r1) and .LC0.  At the
br.call.sptk.many b0
instruction, r36 should contain the address of .LC0.  You should be able to see
this with gdb.
It should be possible to adjust the offset to account for any difference
between 32 and
64-bit runtimes.

If the offset value is wrong, I think we have a binutils issue.  Maybe -milp32
is not being
passed on hpux to assembler.

I don't see any difference between 32-bit and 64-bit code, or between hpux and
linux.

Reply via email to