The 'relocation' error occurs when trying to run an BFLT exectuable on the target ( in our case coldfire). The kernel loads the image into memory and somehow it barfs on some code, which according to the image is supposed to located somewhere outside of legal memory. The loader refuses and prints out a message about this.
Oh, the P&E BDM works well? Good to know. Since I experienced the relocation error, I have been building the kernel with uclinux.org 4.1.1 and C++ apps with CodeSourcery. When building the kernel with CS, I observed a problem when calling 'mount' on my NFS drive, and I didn't feel like investigating at the time, therefore I just figured the easiest way for now is to use two toolchains. CodeSourcery only has m68k-uclinux- executables, whereas 4.1.1 has both where the m68k-elf- simply are links to m68k-uclinux- If you build within the tree, you a sure to be in sync with the uClib and linux headers. CodeSourcery was integrated and tested on a 2.6.10 kernel, I believe. If you only use regular 'user-level' stuff in your application code, you should have no problems building outside the tree, in your own make environment. If you are including some new linux headers into your code, you might run into some minor troubles. For instance, I wanted to access the mtd-user.h into my code in order to access the latest ioctl flags etc for flash memory manipulation. The CS tool chain didn't include them in their distribution, so the code didn't compile initially. I had to make sure the compiler could find them and everything worked great. BTW, I always have used static linking, to the executable itself has no run-time dependencies to shared libs. This facilitates building outside the tree. Harry On 8/14/07, Bob Grimes <[EMAIL PROTECTED]> wrote: > > Hi, > > First, let me apologize for the dual posting - for some reason, gmail > (which I am very new to) does not seem to show messages from me sent > to mailing lists, so I thought the first post was lost. > > Comments below: > > On 8/14/07, Harry Gunnarsson <[EMAIL PROTECTED]> wrote: > > Hi, > > I don't know if coldfire users have the same experience, but I haven't > been > > able to run any C++ app using the uclinux.org provided 4.1.1 toolchain. > I > > always get the 'relocation' error. > > Not sure what you mean by "the 'relocation' error" - are you referring > to the same error I'm stuck on, or another? > > > If I want to run C++ apps, I use the CodeSourcery toolchain version > 4.2-8 > > (free at their website). > > I've been using theirs for building Das U-Boot with no troubles, and > that was also the only way I could get my P&E USB Multilink BDM module > to work with gdb - good stuff!!! I've been using what they call > "ColdFire ELF" target - are you recommending the "ColdFire uClinux" > target? > > > I build as follows (-D could probably be omitted, I borrowed them from > how > > the userapps were built in the source tree): > > m68k-uclinux-g++ -m5307 -pipe -fno-common -fno-builtin -Wall > -msep-data -O1 > > -DCONFIG_COLDFIRE -DEMBED -Dlinux -D__linux__ -Dunix -D__uClinux__ > > -Isrc/cpp_quick_sort/cpp_quicksort_numbers -c > > src/cpp_quick_sort/cpp_quicksort_numbers/cpp_quicksort_numbers.cpp > > -o objs/qsortnum_m68k_Oyes/cpp_quicksort_numbers.o > > m68k-uclinux-g++ -m5307 -DCONFIG_COLDFIRE -Wl,--fatal-warnings > -Wl,-elf2flt > > -Wl,-move-rodata -msep-data -o > > objs/qsortnum_m68k_Oyes/qsortnum_m68k_Oyes.bflt > > objs/qsortnum_m68k_Oyes/cpp_quicksort_numbers.o -lpthread > > Perhaps I'll try this tonight. > > May I ask a question about this? I've been trying to build my > application by putting it into the uClinux/user/ directory, and making > it available to "make menuconfig"; this was suggested to me when I got > started a while ago. I've been assuming this is fine. More to the > point, I've always assumed one could build outside of the uClinux > tree, but that probably means having to understand more of the > details. Is this true? Is it best to stay within the tree? > > Thanks, Harry! > -Bob > _______________________________________________ > uClinux-dev mailing list > [email protected] > http://mailman.uclinux.org/mailman/listinfo/uclinux-dev > This message was resent by [email protected] > To unsubscribe see: > http://mailman.uclinux.org/mailman/options/uclinux-dev >
_______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
