[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/23244] RISC-V 64 relocation truncated to fit in case of undefine
From: |
wilson at tuliptree dot org |
Subject: |
[Bug ld/23244] RISC-V 64 relocation truncated to fit in case of undefined weak references |
Date: |
Wed, 30 May 2018 17:16:45 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=23244
--- Comment #3 from Jim Wilson <wilson at tuliptree dot org> ---
On Wed, 2018-05-30 at 05:17 +0000, address@hidden
wrote:
> Calling a weakly undefined function is undefined behaviour. Would it
> be
> possible to replace the call to zero with a call to the current PC
> (infinite
> loop) or a nop?
Yes, this is what I alluded to at the end, changing the behavior of the
R_RISCV_CALL relocation. We have a register hard wired to zero, so we
don't need to replace the instruction with a nop, we can just change it
to use an x0 + 0 address. That will make it easier to understand what
is going on when looking at disassembly.
Thanks for the pointer to arm behavior. I will look at the arm port
and see if I can do something similar in the RISC-V port. There is a
gcc unwind bug I need to try to fix first, and then I will get back to
this.
--
You are receiving this mail because:
You are on the CC list for the bug.