Here is my toolchains version: - binutils-2.13 - gcc-core-3.4.0 And i use the following commands to build my frv-elf toolchain from the source packages: - binutils-2.13: configure --prefix=/usr/local/frv-elf-toolch --target=frv-elf - gcc-core-3.4.0: configure --prefix=/usr/local/frv-elf-toolch \ --target=frv-elf --without-headers --with-newlib \ --disable-shared --disable-threads --enable-languages=c This relocation bug is a little hidden, it seems that it only appears when linking a very large program. In my test case, there is a const string in frv-linux-2.6.4/init/version.c: const char *linux_banner = "Linux version 2.6.4 ..."; By disassembly analysis, we can kown the address in the '.rodata' section of the string "Linux version 2.6.4 ..." is 0xd299c. While the value of the pointer variable 'linux_banner' is 0xd29a0. So if i use the following function to print this string: printk(linux_banner); i alway get the string "x version 2.6.4 ..." on my virtual terminal !!!
My test case is too large to be attached. Please goto this site to download my test case: http://jtager.sourceforge.net/frv-linux-2.6.4.tar.gz Use the following command to unpack it: tar zxvf frv-linux-2.6.4.tar.gz Then use the following commands to compile the source codes: cd frv-linux-2.6.4 make zImage
Subject: Re: New: The relocation bug Hi zhanrk , > Here is my toolchains version: > - binutils-2.13 > - gcc-core-3.4.0 > 2.13 is an old version of binutils. Can you check to see if the problem also occurs with the latest release (2.15), or even better, the current version in the CVS repository ? Cheers Nick
Hi Rongkai, Any progress on reproducing this bug with a modern release of binutils?
(In reply to comment #3) > Hi Rongkai, > > Any progress on reproducing this bug with a modern release of binutils? > After i updated the binutils-2.13 to binutils-2.15, this bug disappeared.
Closing: the user reports that binutils 2.15 fixes the problem.