riscv: ifunc symbols don't link correctly in RTLD_NOW mode

Jim Wilson jimw@sifive.com
Mon Dec 7 21:42:14 GMT 2020


On Mon, Dec 7, 2020 at 12:51 AM Gilles Duboscq via Libc-alpha <
libc-alpha@sourceware.org> wrote:

> While looking at some JIT compiler code on riscv, i noticed
> __riscv_flush_icache doesn't always work.
> It turns out that __riscv_flush_icache is an "ifunc" symbol and such
> symbols don't link correctly when they are used from a library opened
> with RTLD_NOW on riscv.
>

Vincent Chen posted a patch last week to add RISC-V glibc ifunc support.
We just recently added ifunc support to GNU binutils and GCC.
    https://sourceware.org/pipermail/libc-alpha/2020-December/120236.html
This patch has review comments and needs to be updated.  I pointed him at
your bug report earlier, and he has already confirmed that the patch fixes
the bug you reported.

Jim


More information about the Libc-alpha mailing list