This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug dynamic-link/15030] do_lookup_x returns undefined symbol entry
- From: "hjl.tools at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 07 Feb 2013 18:57:06 +0000
- Subject: [Bug dynamic-link/15030] do_lookup_x returns undefined symbol entry
- Auto-submitted: auto-generated
- References: <bug-15030-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15030
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |NEW
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2013-02-07 18:57:06 UTC ---
[hjl@gnu-6 pr15030]$ cat m.c
#include <stdio.h>
extern __thread char bar[];
extern char size_of_bar asm ("bar@SIZE");
extern void set_bar (int, int);
int
main ()
{
set_bar (1, 20);
if (10 == (long) &size_of_bar && bar[1] == 20)
printf ("OK\n");
else
printf ("BAD\n");
return 0;
}
[hjl@gnu-6 pr15030]$ cat b.c
__thread char bar[10];
void
set_bar (int i, int v)
{
bar[i] = v;
}
[hjl@gnu-6 pr15030]$ make
gcc -B./ -g -O2 -c -o m.o m.c
gcc -B./ -g -O2 -fPIC -c -o b.o b.c
gcc -B./ -shared -o b.so b.o
gcc -B./ -o x m.o b.so -Wl,-R,. -Wl,--hash-style=gnu
gcc -B./ -o x1 m.o b.so -Wl,-R,. -Wl,--hash-style=sysv
./x1
BAD
./x
OK
[hjl@gnu-6 pr15030]$
--
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.