How to relcation .rodata with .text in Cortex-m3
使用arm-none-
(1)目前cortex-
(2)如果无法使用动态链接的话
我就写了一个简单的pr
看到的机器码如下:
.text:000098E4 EXPORT fun_test
.text:000098E4 fun_test ; CODE XREF: main+4p
.text:000098E4 80 B5 PUSH {R7,LR}
.text:000098E6 00 AF ADD R7, SP, #0
.text:000098E8 02 48 LDR R0, =aHelloWorld ; "Hello World!"
.text:000098EA 00 F0 3D F8 BL puts
.text:000098EE 00 BF NOP
.text:000098F0 80 BD POP {R7,PC}
.text:000098F0 ; End of function fun_test
.text:000098F0
.text:000098F0 ; -------
.text:000098F2 00 BF ALIGN 4
.text:000098F4 C8 A4 00 00 off_98F4 DCD aHelloWorld ; DATA XREF: fun_test+4r
.rodata:0000A4C8 48 65 6C 6C 6F 20 57 6F+aHelloWorld DCB "Hello World!",0
在.text段的000098E8处的 LDR R0, =aHelloWorld ; "Hello World!"
请问大家有没有什么好的办法,多谢!
Question information
- Language:
- Chinese Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask qs10086 for more information if necessary.