Re: "cannot run C compiled programs" error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kevin,


On 19/04/11 19/04/11 12:22 AM, "kevin diggs" <diggskevin38@xxxxxxxxx> wrote:

> Hi,
> 
> On Sun, Apr 17, 2011 at 10:45 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
>> Jonathan Wakely <jwakely.gcc@xxxxxxxxx> writes:
>> 
>>>> configure:3166: checking whether the C compiler works
>>>> configure:3175: ./a.out
>>>> ../../../../gcc-4.6-20110408/libgcc/configure: line 3177: ./a.out: Bad CPU
>>>> type in executable
>>> 
> Some type of PowerPC vs x86 thing? Can you use the file command to
> make sure that the architecture matches what you are running on?
> 
I can't seem to find the file a.out anywhere...

> Can you try going into the gcc subdir of your object dir and try to
> compile using -S a simple file and see what the assembler looks like:
> 
> ./xgcc -B. <other stuff may be needed> simple.c

This is what the assembly code looks like for
simple.c
========
int main()
{
        
}

simple.s
========
        .text
        .globl _main
_main:
LFB0:
        pushl   %ebp
LCFI0:
        movl    %esp, %ebp
LCFI1:
        popl    %ebp
LCFI2:
        ret
LFE0:
        .section 
__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
        .set L$set$0,LECIE1-LSCIE1
        .long L$set$0
LSCIE1:
        .long   0
        .byte   0x1
        .ascii "zR\0"
        .byte   0x1
        .byte   0x7c
        .byte   0x8
        .byte   0x1
        .byte   0x10
        .byte   0xc
        .byte   0x5
        .byte   0x4
        .byte   0x88
        .byte   0x1
        .align 2
LECIE1:
LSFDE1:
        .set L$set$1,LEFDE1-LASFDE1
        .long L$set$1
LASFDE1:
        .long   LASFDE1-EH_frame1
        .long   LFB0-.
        .set L$set$2,LFE0-LFB0
        .long L$set$2
        .byte   0
        .byte   0x4
        .set L$set$3,LCFI0-LFB0
        .long L$set$3
        .byte   0xe
        .byte   0x8
        .byte   0x84
        .byte   0x2
        .byte   0x4
        .set L$set$4,LCFI1-LCFI0
        .long L$set$4
        .byte   0xd
        .byte   0x4
        .byte   0x4
        .set L$set$5,LCFI2-LCFI1
        .long L$set$5
        .byte   0xc
        .byte   0x5
        .byte   0x4
        .byte   0xc4
        .align 2
LEFDE1:
        .subsections_via_symbols

Thanks and regards,
Anna.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux