我无法让ld链接到一个非常简单的程序,因为一个截断的重新定位。
(init+0x0): relocation truncated to fit: R_RISCV_PCREL_HI20 against symbol `globalPointer' defined in .bss section in out/bootloader.elf
创建此问题的示例程序集文件:
.section init
.global start
.type start, @function
start:
la gp, globalPointer
.end
使用以下链接器脚本:
ENTRY(start