Closed Jar0T closed 1 year ago
Do you have a full example?
Technically the code is located fixed at address 0x0, thats why it changes to 0.
.global _boot
.text
_boot:
addi x1, x0, 100
la x2, temp
.data
temp:
.byte 10
This code results in loading address of la x2, temp
instead of temp
Just found the issue. I need to specify a linker script, otherwise it defaults to linux one, which expects linux-ld to fill the section offsets. I'm updating the tool with the fixes :D
Now it generates correctly:
And you can change the real offsets in the linker script :D
Using: la t0,