[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/15149] Weak reference leads to DT_NEEDED entry
From: |
meadori at codesourcery dot com |
Subject: |
[Bug ld/15149] Weak reference leads to DT_NEEDED entry |
Date: |
Thu, 04 Apr 2013 01:52:09 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=15149
Meador Inge <meadori at codesourcery dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |meadori at codesourcery dot
| |com
--- Comment #6 from Meador Inge <meadori at codesourcery dot com> 2013-04-04
01:52:09 UTC ---
I see a regression from this change when using a cross ARM GNU/Linux toolchain
built from trunk GCC and binutils sources:
$ cat a.c
#include <pthread.h>
void foo(void)
{
pthread_create(0, 0, 0, 0);
}
$ cat test.cpp
#include <string>
extern "C" void foo(void);
int main(void)
{
foo();
std::string s("foo");
return s.length();
}
$ ./install/bin/arm-none-linux-gnueabi-gcc -c -fPIC a.c
$ ./install/bin/arm-none-linux-gnueabi-gcc -shared -o liba.so a.o -lc -lpthread
$ ./install/bin/arm-none-linux-gnueabi-g++ test.cpp -L. -la
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/install/bin/../lib/gcc/arm-none-linux-gnueabi/4.9.0/../../../../arm-none-linux-gnueabi/bin/ld:
/tmp/ccrHRnUy.o: undefined reference to symbol
'__pthread_key_create@@GLIBC_2.4'
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/install/bin/../lib/gcc/arm-none-linux-gnueabi/4.9.0/../../../../arm-none-linux-gnueabi/bin/ld:
note: '__pthread_key_create@@GLIBC_2.4' is defined in DSO
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/install/bin/../arm-none-linux-gnueabi/libc/lib/libpthread.so.0
so try adding it to the linker command line
/scratch/meadori/arm-none-linux-gnueabi-fsf-mainline/install/bin/../arm-none-linux-gnueabi/libc/lib/libpthread.so.0:
could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/15149] Weak reference leads to DT_NEEDED entry,
meadori at codesourcery dot com <=