http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56473



--- Comment #3 from Thomas Dean <tomdean at speakeasy dot org> 2013-02-28 
00:24:44 UTC ---

On Ubuntu, I recompiled with -g



On RaspberryPi, I ran gdb on the resulting executable

tomdean@raspberrypi:~/p9x79/bug$ gdb hello

GNU gdb (GDB) 7.4.1-debian

<snip>

Reading symbols from /home/tomdean/p9x79/bug/hello...done.

(gdb) b main

Breakpoint 1 at 0x8364: file hello.c, line 3.

(gdb) r

Starting program: /home/tomdean/p9x79/bug/hello 



Program received signal SIGSEGV, Segmentation fault.

0x000573a6 in ?? ()

(gdb) bt

#0  0x000573a6 in ?? ()

#1  0x000082ee in _start ()



I think the ubuntu crtxxx.o files and the unbunt arm-linux-gnueabihf-gcc-4.6

libs were not built correctly.  diff says they are not the same as the

RaspberryPi files.



If I compile on ubuntu and link on RaspberryPi, all is well.



If I compile on ubuntu and link, using the crtxxx.o and libs from RaspberryPi,

all is well.

Reply via email to