[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19553] linking against libs that require pthreads breaks due to
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes |
Date: |
Mon, 01 Feb 2016 16:20:57 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19553
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
address@hidden pr19553]$ cat pr19553a.c
extern void foo (void);
int
main (void)
{
foo ();
return 0;
}
address@hidden pr19553]$ cat pr19553b.c
#include <stdio.h>
__attribute__ ((weak))
void
foo (void)
{
printf ("pr19553b\n");
}
address@hidden pr19553]$ cat pr19553c.c
#include <stdio.h>
void
foo (void)
{
printf ("pr19553c\n");
}
asm (".symver foo,address@hidden");
address@hidden pr19553]$ cat pr19553d.c
#include <stdio.h>
__attribute__ ((weak))
void
foo (void)
{
printf ("pr19553d\n");
}
address@hidden pr19553]$ cat pr19553.map
FOO
{
global:
foo;
};
address@hidden pr19553]$ make
gcc -B./ -O2 -O2 -c -o pr19553a.o pr19553a.c
gcc -B./ -O2 -fPIC -c -o pr19553d.o pr19553d.c
gcc -B./ -O2 -fPIC -c -o pr19553c.o pr19553c.c
gcc -B./ -shared -o libpr19553c.so pr19553c.o -Wl,--version-script=pr19553.map
gcc -B./ -shared -o libpr19553d.so pr19553d.o libpr19553c.so
gcc -B./ -O2 -fPIC -c -o pr19553b.o pr19553b.c
gcc -B./ -shared -o libpr19553b.so pr19553b.o -Wl,--version-script=pr19553.map
gcc -B./ -o x pr19553a.o libpr19553d.so libpr19553b.so -Wl,-R.
./ld: libpr19553d.so: undefined reference to symbol 'address@hidden'
./libpr19553c.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:23: recipe for target 'x' failed
make: *** [x] Error 1
address@hidden pr19553]$
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/19553] New: linking against libs that require pthreads breaks due to symbol changes, vapier at gentoo dot org, 2016/02/01
- [Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes,
hjl.tools at gmail dot com <=
- [Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes, hjl.tools at gmail dot com, 2016/02/01
- [Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes, cvs-commit at gcc dot gnu.org, 2016/02/01
- [Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes, hjl.tools at gmail dot com, 2016/02/01
- [Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes, cvs-commit at gcc dot gnu.org, 2016/02/26
- [Bug ld/19553] linking against libs that require pthreads breaks due to symbol changes, hjl.tools at gmail dot com, 2016/02/26