qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [qemu-riscv] Error mapping file: Invalid argument
@ 2025-03-10 14:52 Chu, Benson
  2025-03-10 15:55 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Chu, Benson @ 2025-03-10 14:52 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

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


[-- Attachment #2: Type: text/html, Size: 2845 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-10 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 14:52 [qemu-riscv] Error mapping file: Invalid argument Chu, Benson
2025-03-10 15:55 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).