public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Seg fault in  call_gmon_start
@ 2008-03-07  6:42 Desineni, Harikishan
  2008-03-08 23:11 ` Jim Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Desineni, Harikishan @ 2008-03-07  6:42 UTC (permalink / raw)
  To: gcc, gcc-help

I just compiled an app with GCC. It is segmentation faulting in call_gmon_start (even before reaching main() of my program

What does call_gmon_start() do ? Which library defines this function? 

gdb) where
#0  0x2a000750 in call_gmon_start ()
#1  0x00000000 in ?? ()
(gdb) info


(gdb) disassemble call_gmon_start
Dump of assembler code for function call_gmon_start:
0x2a000750 <call_gmon_start+0>: str     r10, [sp, #-4]!
0x2a000754 <call_gmon_start+4>: ldr     r10, [pc, #32]  ; 0x2a00077c <call_gmon_start+44>
0x2a000758 <call_gmon_start+8>: ldr     r3, [pc, #32]   ; 0x2a000780 <call_gmon_start+48>
0x2a00075c <call_gmon_start+12>:        add     r10, pc, r10
0x2a000760 <call_gmon_start+16>:        ldr     r2, [r10, r3]
0x2a000764 <call_gmon_start+20>:        cmp     r2, #0  ; 0x0
0x2a000768 <call_gmon_start+24>:        beq     0x2a000774 <call_gmon_start+36>
0x2a00076c <call_gmon_start+28>:        ldmia   sp!, {r10}
0x2a000770 <call_gmon_start+32>:        b       0x2a000744 <_init+100>
0x2a000774 <call_gmon_start+36>:        ldmia   sp!, {r10}
0x2a000778 <call_gmon_start+40>:        bx      lr
0x2a00077c <call_gmon_start+44>:        andeq   r8, r0, r0, ror #9
0x2a000780 <call_gmon_start+48>:        andeq   r0, r0, r12, lsr #32
End of assembler dump.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Seg fault in  call_gmon_start
  2008-03-07  6:42 Seg fault in call_gmon_start Desineni, Harikishan
@ 2008-03-08 23:11 ` Jim Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Wilson @ 2008-03-08 23:11 UTC (permalink / raw)
  To: Desineni, Harikishan; +Cc: gcc, gcc-help

Desineni, Harikishan wrote:
> I just compiled an app with GCC. It is segmentation faulting in call_gmon_start (even before reaching main() of my program

Gcc usage questions should not be sent to the gcc list.  This list is 
for being doing development work on gcc.  This is an appropriate 
question for the gcc-help list.

It will probably do nothing unless you compiled with -pg.  The important 
bit here is that your program is apparently failing on the very first 
instruction it executes, as call_gmon_start is probably the first 
function in the init section, which contains initializers run before 
calling main.  So there is apparently something seriously wrong with 
your setup, e.g. the kernel isn't constructing the process stack 
correctly, or the process stack is being mapped to non-existent memory, 
or something else unusual is going wrong.  There may not be anything 
wrong with gcc itself.

call_gmon_start comes from glibc by the way.  Look there for more info.

Jim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-03-08 23:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-07  6:42 Seg fault in call_gmon_start Desineni, Harikishan
2008-03-08 23:11 ` Jim Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).