new gcc version on s3c2440 --> Segmentation fault

Dee
Hi,

Im using a board with a S3C2440 processor (not the mini2440) with an old
GCC Version 3.4.1. Now id like to update the compiler, because some
software wont compile with the old one. 

I downloaded the ARM-Linux GCC 4.3.2 from here (i think this should
work..?) and cross compiled a simple hello world console application and
transferd it to my taget.

I used the follow command to compile the application (helloWorld.c):

/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc -o helloWorld
helloWorld.c -Wl,-rpath=/usr/newcompiler/lib/
-Wl,-dynamic-linker=/usr/newcompiler/lib/ld-linux.so.3

I used rpath and dynamic-linker to force the use of the new glib on my
target.
Then i copied the the lib directory from
/usr/local/arm/4.3.2/arm-nonelinux-gnueabi/libc/armv4t/lib to my target
into /usr/newcompiler/lib/

If i start the helloWorld app he finds the libraries, but aborts with a
Segmentation Fault.

What am i missing?

Juergen Beisert
Did you check (for example via 'strace') what libraries your program is
using at runtime? Can you build your program with debug information and run
it with 'catchsegv' to get an idea where it crashes?

Dee
Hi. 
Thanks for your answer.

it tried to use ldd to see what libraries are used:

# ldd ./helloWorld
ldd: exited with unknown exit code (139)

looks like it aborts with Signal number 11. SIGSEGV.


and strace gives :

# strace ./helloWorld
execve("./helloWorld", ["./helloWorld"], [/* 11 vars */]) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1,
 0) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Segmentation fault

serg_io
Hi
May be you need -mcpu=arm920t compiler option? Seems
arm-none-linux-gnueabi-gcc by default use armv5 otptions.


Sergio

Dee
Hi

I found the problem. My Kernel didnt had EABI support enabled.

Thanks for your help.