What does the hash (#) value associated with the ARM LDR instruction mean?

前端 未结 3 1849
滥情空心
滥情空心 2021-02-20 18:46

I\'m trying to debug a crash I am experiencing in my application. The stack trace is pointing to an LDR instruction with the following format (thanks disassembler):



        
3条回答
  •  悲&欢浪女
    2021-02-20 18:54

    In GNU gas, the hash # is only required for ARMv7 when not using .syntax unified

    For example, you can write it without # for ARMv8 aarch64-linux-gnu-as:

    LDR x0, [x0,4]
    

    or if use .syntax unified in arm-linux-gnueabihf-as:

    .syntax unified
    LDR x0, [x0,4]
    

    More details at: Is the hash required for immediate values in ARM assembly?

提交回复
热议问题