[PATCH 0/2] riscv: add support for GNU indirect function

Jim Wilson jimw@sifive.com
Mon Dec 7 21:36:15 GMT 2020


On Tue, Dec 1, 2020 at 6:52 PM Jim Wilson <jimw@sifive.com> wrote:

> On Tue, Dec 1, 2020 at 2:23 AM Vincent Chen <vincent.chen@sifive.com>
> wrote:
>
>> IREALTIVE relocation of the position-dependent executable program. To
>> solve this problem, a new RISCV specific dynamic entry, DT_RISCV_GP,
>> created by Binutils is used to record the gp address. The dynamic
>> linker can use it to initialize $gp register before resolving the
>> IREALTIVE relocation of the PDE program.
>>
>
> We should discuss DT_RISCV_GP with RISC-V International since we don't own
> the ISA.  I opened a psabi issue.
>     https://github.com/riscv/riscv-elf-psabi-doc/issues/165
> The llvm/lld and FreeBSD developers also care about this stuff.
>

Just to follow up on this, in the psabi discussion, the lld and FreeBSD
linker experts asked for a DT_SYMTAB solution to get the gp value, instead
of adding a new dynamic tag which is an ABI change.

Jim


More information about the Libc-alpha mailing list