You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0x80000052 is the end of main, but stops two bytes before the next section .eh_frame. My guess is that it's some sort of alignment problem, but I'm not sure how to read most of this stuff, so any pointers would be welcome!
I've attached my .ld script and .dts output with this post:
I had a chat with pm215 on #qemu@oftc irc, and he identified the problem to be bios that gets automatically loaded at memory start. Also -kernel adds some magic, making the PC start in a different place (0x1000 on mine).
Adding -bios none and using -device loader,file=<elf-file>,cpu-num=0 instead of using -kernel <elf-file> solves it.
Hey, thanks for a brilliantly written tutorial. Impressive clarity!
I am trying to make it work with qemu-riscv64 and riscv64-elf-* tools from archlinux. It compiles fine, but when I run, I get the following error:
I've reduced the main code to just
int main { return 0; }
, which disassembles to:0x80000052
is the end ofmain
, but stops two bytes before the next section.eh_frame
. My guess is that it's some sort of alignment problem, but I'm not sure how to read most of this stuff, so any pointers would be welcome!I've attached my
.ld
script and.dts
output with this post:riscv64-virt.dts.txt
riscv64-virt.ld.txt
The text was updated successfully, but these errors were encountered: