loody wrote: > "File is not an object file" > so, it seems I have to make a object relocation file to let this tool, > arm-linux-elf2flt, work. > but how? Don't use the tool directly, use it with GCC as you found: > 2. I use "-Wl,-elf2flt=-s1024" with arm-linux-gcc and it says: > > /media/sda6/uclinux/usr/local/bin/../lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real: > address 0x53880 of a.out.gdb section .text is not within region > flatmem > /media/sda6/uclinux/usr/local/bin/../lib/gcc/arm-linux/3.4.4/../../../../arm-linux/bin/ld.real: > error: no memory region specified for loadable section > `__libc_freeres_fn' > collect2: ld returned 1 exit status With a proper toolchain including uClibc _from that same toolchain_ it just works. If you mix with uClibc from elsewhere, then it may fail. Note that some toolchains don't have uClinux no-MMU support. Unfortunately there isn't a good site pointing to all the latest good toolchains for each target. (By the way, you will need a bigger value than 1024 in the option -Wl,-elf2flt,-s32768. That shouldn't affect compiling and linking, but 1024 is too small and the program is likely to have problems when you run it.) > it seems the elf2flt.ld need some modification, if I guess correctly. That's right. With all the toolchains I used, though, which come with their own uClibc, elf2flt.ld is already correct. Oh, unless you're using C++. C++ doesn't work properly with older toolchains. Try C. > 3. Do i use the wrong toolchain, since I use arm-linux instead of > arm-elf. If so, where I can download arm-elf toolchain as arm-linux > did on uclinux.org, except those obselete. They both work for creating C executables which run on uClinux. Yes, the links on uclinux.org are obsolete. Search the archive of this mailing list for more recent suggests. The Codesourcery ones get mentioned a lot. > BTW, I have use build root to re-get the toolchain. But when I enable > elf2flt config. the compile will show the error message below: > /media/sda6/uclinux/buildroot-2009.02-rc2/toolchain_build_arm/binutils-2.19-build/bfd/libbfd.a(compress.o): > In function `bfd_uncompress_section_contents': > /media/sda6/uclinux/buildroot-2009.02-rc2/toolchain_build_arm/binutils-2.19/bfd/compress.c:96: > undefined reference to `inflateInit_' > /media/sda6/uclinux/buildroot-2009.02-rc2/toolchain_build_arm/binutils-2.19/bfd/compress.c:103: > undefined reference to `inflate' > make: *** [elf2flt] Error 1 I've never seen this. (But I'm intrigued by the possibility of compressed section support in binutils, which I hadn't noticed before :-) Your solution is to get a toolchain that others have used, better a more recent one, try a C program first (because C++ doesn't always work on older toolchains), and don't mix with other libraries. So try a "hello world" program first :-) -- Jamie -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ