#9821 - Omega81 - Tue Aug 19, 2003 2:01 am
Hello I was wondering if anyone knew how to create variables in GAS. From the -S output I can see that GCC create two label; one for storing the varible names and another for storing there size. Then in the code, the varibles are writen and read from as array element. Here is a code strip
is this how I will have to create variables cause I was hoping I could ust use the variable name directly just have them defined in a .data section or something.
Any throughs?
_________________
Keep it real, keep it Free, Keep it GNU
Code: |
ldr r2, .L2 ..... ldr r2, .L2+4 mov r3, #55 str r3, [r2, #0] ldr r2, .L2+8 mov r3, #33792 add r3, r3, #147 str r3, [r2, #0] ldr r4, .L2+8 ldr r0, .L2+8 ldr r3, .L2 ldr r2, .L2+4 ...... ldr r3, .L2 ldr r3, [r3, #0] mov r0, r3 .... .L3: .align 2 .L2: .word frn .word sun .word too .Lfe1: .size main,.Lfe1-main .comm frn, 4, 32 .comm sun, 4, 32 .comm too, 4, 32 |
is this how I will have to create variables cause I was hoping I could ust use the variable name directly just have them defined in a .data section or something.
Any throughs?
_________________
Keep it real, keep it Free, Keep it GNU