[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
[arm-gnu] Programs compiled with -p abort with Segmentation Fault.
- To: arm-gnu@xxxxxxxxxxxxxxxx
- Subject: [arm-gnu] Programs compiled with -p abort with Segmentation Fault.
- From: "Dmitry Fink" <finikk@xxxxxxxxx>
- Date: Thu, 15 May 2008 12:05:17 -0700
Toolchain: 2007q3-51
I'm compiling a simple "Hello world" with -p option. When I run it, I get
Segmentation fault from mcount (it seems like the first call to mcount right
from the start of main():
0x00008470 <main+0>: stmdb sp!, {r11, lr}
0x00008474 <main+4>: add r11, sp, #4 ; 0x4
0x00008478 <main+8>: bl 0x836c <mcount>
0x0000847c <main+12>: ldr r0, [pc, #4] ; 0x8488 <main+24>
0x00008480 <main+16>: bl 0x8378 <puts>
0x00008484 <main+20>: ldmia sp!, {r11, pc}
0x00008488 <main+24>: andeq r8, r0, r12, lsr #10
mcount:
0x400eaef0 <mcount+0>: undefined
0x400eaef4 <mcount+4>: add r11, sp, #0 ; 0x0
0x400eaef8 <mcount+8>: stmdb sp!, {r0, r1, r2, r3}
0x400eaefc <mcount+12>: movs r11, r11
0x400eaf00 <mcount+16>: moveq r1, #0 ; 0x0
0x400eaf04 <mcount+20>: ldrne r1, [r11, #-4]
0x400eaf08 <mcount+24>: ldrne r0, [r11, #-12]
0x400eaf0c <mcount+28>: movnes r0, r0
0x400eaf10 <mcount+32>: ldrne r0, [r0, #-4]
0x400eaf14 <mcount+36>: movs r0, r0
0x400eaf18 <mcount+40>: blne 0x400ead44 <mcount_internal>
0x400eaf1c <mcount+44>: undefined
0x400eaf20 <mcount+48>: add sp, r11, #0 ; 0x0
0x400eaf24 <mcount+52>: ldmia sp!, {r11}
0x400eaf28 <mcount+56>: bx lr
Result:
[64682.840000] Alignment trap: a.out (697) PC=0x400eaf24 Instr=0xe8bd0800
Address=0xeb0060d6 FSR 0x001
What am I missing?
Thanks in advance
Dmitry Fink
|