[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/435] New: The relocation bug
From: |
zhanrk at 163 dot com |
Subject: |
[Bug binutils/435] New: The relocation bug |
Date: |
9 Oct 2004 02:27:51 -0000 |
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 !!!
--
Summary: The relocation bug
Product: binutils
Version: 2.13
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: zhanrk at 163 dot com
CC: bug-binutils at gnu dot org
GCC build triplet: configure --prefix=/usr/local/frv-elf-toolch --
target=frv-elf
GCC host triplet: i686 RH9-Linux
GCC target triplet: frv-elf
http://sources.redhat.com/bugzilla/show_bug.cgi?id=435
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/435] New: The relocation bug,
zhanrk at 163 dot com <=