Page 1 of 1

Problem building hello APP.

Posted: Wed Jul 22, 2009 11:09 am
by glodone
Hi all,

I loaded the kernel and rootfs from esky.
I build a hello app which prints "hello" with gcc-4.3.2
When I put it in mini2440 and try to run it then it gives me a "Segmentation Fault".
Never before got this.

How can it be resolved.


Thanks,
Guillermo.

This is the app code:

File: main.c

Code: Select all

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    printf( "hola\n" ) ;
    return (EXIT_SUCCESS);
}

Code: Select all

arm-linux-gcc -o hello main.c

ANOTHER THING I SAW
I downloaded from angstrom the gdb and tried to execute it.
Then it gave me "Illegal Instruction".
So I downloaded the libc6 from angstrom. (Install it)
and then the gdb worked.
But not the hello app.


GDB output

Code: Select all

[root@FriendlyARM /home]# gdb /home/hello
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-angstrom-linux-gnueabi"...
"/home/hello": not in executable format: File format not recognized

Re: Problem building hello APP.

Posted: Tue Aug 18, 2009 3:58 pm
by fabianpie
Hi,
I get the same problem but if I run the same object in buserro-angstrom distribution I have no problem so I'm sure the application is well compiled.

Re: Problem building hello APP.

Posted: Sun Sep 27, 2009 7:52 am
by khire_s
Even I am getting same issue with my hello.bin
It gives me error

[root@FriendlyARM sbin]# ./hello.bin
-sh: ./hello.bin: not found
[root@FriendlyARM sbin]#

Don't know whats wrong.
I have raised a separate post with Topic :- " Simple Linux Hello word exe is NOT executing on mini2440 3.5 "

Hope some one is there to help.

Thanks

Satish