The arm-linux-gcc must be used if the program is to be run in Linux environment. The arm-elf-gcc is used to compile program that runs without Linux.
Thanks for the reply. I had actually discovered my mistake and with the help of a tool called Crosstool_NG managed to build an arm-linux-gcc toolchain which seems to work.