How exactly do linkers find the symbol of a R_RISCV_PCREL_HI20I relocation, given a R_RISCV_PCREL_LO12 relocation?
This is a followup question to What do %pcrel_hi and %pcrel_lo actually do?. I’m writing a simple Risc-V linker, and I’m trying to understand how, given an R_RISCV_PCREL_LO12I
relocation, the symbol of the corresponding R_RISCV_PCREL_HI20
relocation is found.
How exactly do linkers find the symbol of a R_RISCV_PCREL_HI20I relocation, given a R_RISCV_PCREL_LO12 relocation?
This is a followup question to What do %pcrel_hi and %pcrel_lo actually do?. I’m writing a simple Risc-V linker, and I’m trying to understand how, given an R_RISCV_PCREL_LO12I
relocation, the symbol of the corresponding R_RISCV_PCREL_HI20
relocation is found.