entry.S: illegal addend for R_RISCV_GOT_HI20 (#51)
When building riscv-tests with Ubuntu’s gcc 15.2.0-7ubuntu1 an error occurs:
rv32ui-v-simple-entry.o: in function `handle_reset': (.text.init+0xa4): dangerous relocation: The addend isn't allowed for R_RISCV_GOT_HI20Split loading STACK_TOP - SIZEOF_TRAPFRAME_T into separate load and add instructions.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc only describes R_RISCV_GOT_HI20 with offset 0 to a label.
The topic of addends for R_RISCV_GOT_HI20 was discussed in https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号