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: unassig...@gcc.gnu.org

        ReportedBy: tomd...@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

Reply via email to