public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/15030] do_lookup_x returns undefined symbol entry
Date: Thu, 07 Feb 2013 18:57:00 -0000	[thread overview]
Message-ID: <bug-15030-131-vE9OPLDghd@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <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.


  parent reply	other threads:[~2013-02-07 18:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 20:24 [Bug dynamic-link/15030] New: " hjl.tools at gmail dot com
2013-01-18  2:14 ` [Bug dynamic-link/15030] " hjl.tools at gmail dot com
2013-01-18 15:26 ` hjl.tools at gmail dot com
2013-01-18 17:58 ` hjl.tools at gmail dot com
2013-01-18 23:02 ` hjl.tools at gmail dot com
2013-02-07  2:20 ` hjl.tools at gmail dot com
2013-02-07 18:57 ` hjl.tools at gmail dot com [this message]
2014-06-13 19:01 ` fweimer at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15030-131-vE9OPLDghd@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).