Rui Ueyama

Results 604 comments of Rui Ueyama

One idea is to require the compiler to always read a function address from GOT for an indirect function call even for PDE. We already require it for possibly undefined...

A global function is put into the dynamic symbol table by default only when you are creating a DSO. If you are building an executable, a function is not visible...

Right. LTO enables the compiler to do the whole program analysis, but the linker can naturally do the same without LTO in this case.

What would be the next step? Should I write up a proposal as a change to the spec?

It's not for RISC-V, but I've already implemented a prototype for x86-64. https://github.com/rui314/mold/commit/17f0d85efb427681f70db4f46a88a17dc660649f

@ved-rivos A new relocation is not absolutely necessary indeed. But by convention, the linker does not remove an instruction or replace it with a compact one unless the instruction is...

Correct. Specifically, if a symbol is referred to by any relocation other than `R_RISCV_CALL` or `R_RISCV_CALL_PLT`, the symbol is considered as address-taken. In your case, `A_global_function` would be referred to...

But we first need a proof-of-concept implementation, no?