Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
gcc segment usage
Locked
Locked
Replies
4 replies
Subscribers
119 subscribers
Views
3308 views
Users
0 members are here
Options
Share
More actions
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
gcc segment usage
Etienne SOBOLE
over 12 years ago
Note: This was originally posted on 17th April 2011 at
http://forums.arm.com
Hi!
With gcc, we have 4 segment:
.rodata : readonly data
.data : initialized global var
.bss : uninitialized global var
.text : assembler code source
To use ADR opcode, you have to put your data into .text segment.
For example
main:
push {r7, lr}
adr r0, .myString
bl printf
mov r0, #0
pop {r7, pc}
.myString:
.asciz "Hello\n"
I'd like to know (to be sure in fact) if you can't write into .text segment.
Ie, you can't write into r0 after the ADR instruction !
Can anybody confirm me that .text segment is read only ?
0
Quote