From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2801 invoked by alias); 27 Feb 2013 15:16:30 -0000 Received: (qmail 2605 invoked by uid 48); 27 Feb 2013 15:16:04 -0000 From: "tomdean at speakeasy dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56473] New: Cross Compile Ubuntu x86_64 to Raspberry Pi Code Seg Faults When Executed Date: Wed, 27 Feb 2013 15:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tomdean at speakeasy dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg02596.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56473 Bug #: 56473 Summary: Cross Compile Ubuntu x86_64 to Raspberry Pi Code Seg Faults When Executed Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: tomdean@speakeasy.org Created attachment 29548 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29548 Script of the compile/link I compiled and linked on Ubuntu x86_64 for the Raspberry Pi. The compiler/linker completed with no errors. int main() { return 0;} When hello is executed on Raspberry Pi, I got a Segmentation fault. If I compile on Ubuntu with -nostdlib and explicitly list the Raspberry Pi crtxxx.o files and the Raspberry Pi libs, the resultant executable completes without error on Raspberry Pi. I attached a script of the compile actions on Ubuntu. I believe this to be a problem with the crtxxxx.o files and the libs distributed with arm-linux-gnueabihf-gcc-4.6 package. The same package on Raspberry Pi works Ok. On Ubuntu > uname -a Linux P9X79 3.2.0-38-generic #60-Ubuntu SMP Wed Feb 13 13:22:43 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux On Raspberry Pi > uname -a Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux