http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51456
Bug #: 51456
Summary: gcc-4.5.3 ARM misaligned relocation for
__gxx_personality_v0 in libstdc++
Classification: Unclassified
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: junkmailnotr...@yahoo.com
gcc-4.5.3 cross-compiled for ARM generates a misaligned relocation for
__gxx_personality_v0 in libstdc++.
This was found when running Mozilla Fennec, but also occurs with trivial
programs linked against libstdc++ such as Hello World.
C file hello.c contains:
#include
int main(void)
{
printf("hello world\n");
return (0);
}
Compiled on an x86_64 host as follows:
% arm-softfloat-linux-gnueabi-gcc -o hello hello.c -lstdc++
%
Run on an ARM target (iPAQ hx4700) produces the following:
# ./hello
Bus error
#
Adding ld.so debug produces the following:
# export LD_DEBUG=all
# ./hello
682:
682: relocation processing: /lib/libstdc++.so.6 (lazy)
682: symbol=__gxx_personality_v0; lookup in file=./hello [0]
682: symbol=__gxx_personality_v0; lookup in
file=/lib/libstdc++.so.6 [0]
682: binding file /lib/libstdc++.so.6 [0] to /lib/libstdc++.so.6
[0]: normal symbol `__gxx_personality_v0' [CXXABI_1.3]
Bus error
#
Running objdump on the host shows the misaligned symbol:
% arm-softfloat-linux-gnueabi-objdump -R
/usr/lib/gcc/arm-softfloat-linux-gnueabi/4.5.3/libstdc++.so.6.0.14 | fgrep
__gxx_personality_v0
00107afb R_ARM_ABS32 __gxx_personality_v0
00124848 R_ARM_JUMP_SLOT __gxx_personality_v0
%
The version information returned by gcc-4.5.3 is the following:
% arm-softfloat-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/arm-softfloat-linux-gnueabi/gcc-bin/4.5.3/arm-softfloat-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-softfloat-linux-gnueabi/4.5.3/lto-wrapper
Target: arm-softfloat-linux-gnueabi
Configured with:
/var/tmp/portage/cross-arm-softfloat-linux-gnueabi/gcc-4.5.3-r1/work/gcc-4.5.3/configure
--prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/arm-softfloat-linux-gnueabi/gcc-bin/4.5.3
--includedir=/usr/lib/gcc/arm-softfloat-linux-gnueabi/4.5.3/include
--datadir=/usr/share/gcc-data/arm-softfloat-linux-gnueabi/4.5.3
--mandir=/usr/share/gcc-data/arm-softfloat-linux-gnueabi/4.5.3/man
--infodir=/usr/share/gcc-data/arm-softfloat-linux-gnueabi/4.5.3/info
--with-gxx-include-dir=/usr/lib/gcc/arm-softfloat-linux-gnueabi/4.5.3/include/g++-v4
--host=x86_64-pc-linux-gnu --target=arm-softfloat-linux-gnueabi
--build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point
--without-ppl --without-cloog --disable-lto --with-float=soft --disable-nls
--with-system-zlib --disable-werror --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libssp --disable-libgomp
--with-python-dir=/share/gcc-data/arm-softfloat-linux-gnueabi/4.5.3/python
--enable-checking=release --disable-libgcj --enable-languages=c,c++
--with-sysroot=/usr/arm-softfloat-linux-gnueabi --disable-bootstrap
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.5.3-r1 p1.0,
pie-0.4.5'
Thread model: posix
gcc version 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5)
%