Problem building hello APP.

Post Reply
glodone
Posts: 3
Joined: Thu May 07, 2009 9:26 am

Problem building hello APP.

Post by glodone » Wed Jul 22, 2009 11:09 am

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

fabianpie
Posts: 7
Joined: Sat Jan 24, 2009 12:08 pm

Re: Problem building hello APP.

Post by fabianpie » Tue Aug 18, 2009 3:58 pm

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.

khire_s
Posts: 12
Joined: Wed Sep 23, 2009 9:52 pm
Location: Pune
Contact:

Re: Problem building hello APP.

Post by khire_s » Sun Sep 27, 2009 7:52 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests