Hello all, I am working on a linker for the RISC-V target, and I was trying to use qemu-riscv32 to test my linker.
However, I have noticed that qemu-riscv32 has some restrictions about how the program can be laid out in memory, and getting my linker to place the program in a way that qemu-riscv32 will accept is very annoying. By my understanding, for each segment to be loaded, offset into the ELF file must match the offset into a target page, which seems to be 4KiB. I noticed that GNU ld and LLVM's lld both follow this placement by default. Is there some ABI that's being conformed to for this? Is there any documentation describing why placement needs to be done this way? Thanks! Benson