riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
570 stars 304 forks source link

toplevel inline-asm in pk/pk.c is broken #282

Closed apinski-cavium closed 1 year ago

apinski-cavium commented 1 year ago

I just happen to find this issue really (I was reading the code at random). Basically the toplevel inline-asm in riscv-pk/pk/pk.c around line 185 does not set the section and reset the section back so the symbol rest_of_boot_loader might be in a random section (might even be in a debug section in some cases; e.g. gcc with -g3).

aswaterman commented 1 year ago

Fun that it has been working by coincidence.