Rustc/LLVM generates faulty code for aarch64 with opt-level=0

后端 未结 1 1026
梦谈多话
梦谈多话 2021-01-19 00:40

I have two files which are assembled/compiled/linked into minimalistic kernel.

start.s:

    .set CPACR_EL1_FPEN, 0b11 << 20

    .set BOOT_STAC         


        
相关标签:
1条回答
  • 2021-01-19 01:32

    I've succeeded to run the non-optimised code without abnormalities. Thanks to Notlikethat for the idea. My stack was just mapped into readonly memory.

    So I've just added the offset statement into my linker script (". = 1024M;") in order to make all the symbols to start from 1GiB (where RAM begins). After this modification the code started to work properly.

    0 讨论(0)
提交回复
热议问题