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

emdebian toolchain hello world problem



Hi,

I have a pxa270 based board...

I already compile a new kernel to my board with emdebian's cross toolchain and it works properly!

But, I have some problem to compile this code :) :

devel:/opt/rootfs# cat test_init.c
#include <stdio.h>

int main()
{
  printf("Hello world!\n");
  sleep(999999999);
}

Compile:
devel:/opt/rootfs# arm-linux-gnu-gcc -static -o test_init test_init.c
devel:/opt/rootfs# echo $?
0

Check static:
devel:/opt/rootfs# arm-linux-gnu-readelf -a test_init|grep "Shared library"
devel:/opt/rootfs#


Copy to board and run:
# /tmp/test_init
Illegal instruction
#



:)
I can compile the kernel with the toolchain but I can't compile a "Hello world"?

Where is the problem?

Regards,
Balázs


Reply to: