[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol
From: |
tg at mirbsd dot de |
Subject: |
[Bug ld/10144] mips/ld: non-dynamic relocations refer to dynamic symbol |
Date: |
23 Jan 2010 18:03:11 -0000 |
------- Additional Comments From tg at mirbsd dot de 2010-01-23 18:03 -------
Created an attachment (id=4550)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4550&action=view)
Testcase #3 (with .c .s .o/.so)
(In reply to comment #4)
> Works for me with FSF versions of GCC and binutils, and the version
> of GLIBC I have to hand. Please post a self-contained testcase that
> just needs a binutils build to run. Please also post the .s files.
Okay:
address@hidden:~ # gcc -O2 -g -S ya.c
address@hidden:~ # gcc -O2 -g -c
ya.s
address@hidden:~ # gcc -O2 -g -S -fPIC yb.c
address@hidden:~ # gcc -O2 -g -fPIC -shared -o libb.so
yb.s
address@hidden:~ # gcc -O2 -g -o y ya.o -L. -lb; echo =\> $?
/usr/bin/ld: non-dynamic relocations refer to dynamic symbol xxprogname
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
=> 1
Took me a while though. The -g is important.
address@hidden:~ # gcc -v
Using built-in specs.
Target: mipsel-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.2-9' --with-
bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-
languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-
multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --
without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/
include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --
enable-libstdcxx-debug --disable-libssp --enable-targets=all --enable-
checking=release --build=mipsel-linux-gnu --host=mipsel-linux-gnu --
target=mipsel-linux-gnu
Thread model: posix
gcc version 4.4.3 20100108 (prerelease) (Debian 4.4.2-9)
address@hidden:~ # ld -v
GNU ld (GNU Binutils for Debian) 2.20
binutils 2.20-5
gcc-4.4 4.4.2-9
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10144
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.