public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Thorsten Kukuk <kukuk@suse.de>
To: Roland McGrath <roland@redhat.com>
Cc: libc-hacker@sources.redhat.com
Subject: Re: Questions about __thread for NSS modules
Date: Thu, 26 Aug 2004 12:06:00 -0000	[thread overview]
Message-ID: <20040826120638.GA20764@suse.de> (raw)
In-Reply-To: <200408261020.i7QAKVE9018030@magilla.sf.frob.com>

On Thu, Aug 26, Roland McGrath wrote:

> > My question is: is this possible at all in NSS modules like libnss_nis.so?
> 
> Sure.  
> 
> > Do I need to link against libpthread? 
> 
> No.
> 
> > My first try ends in a unresolved "__tls_get_addr" symbol when I try to
> > link the module.
> 
> I'll assume that's actually ___tls_get_addr if you're on x86.
> This suggests your dynamic linker is not built with TLS support.
> It defines that symbol.  

I know and it is there:

firun:/usr/src/packages/BUILD/glibc-2.3/cc-nptl# nm elf/ld.so |grep __tls_get_addr
0000f010 T ___tls_get_addr
0000f770 T __tls_get_addr
0000f010 t ___tls_get_addr_internal


But when linking the NSS modules, I get the following error:

gcc   -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/lib/ld-linux.so.2  -B/usr/src/packages/BUILD/glibc-2.3/cc-nptl/csu/  -Wl,--version-script=/usr/src/packages/BUILD/glibc-2.3/cc-nptl/libnss
_nis.map -Wl,-soname=libnss_nis.so.2 -Wl,-z,combreloc -Wl,-z,relro  -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/math -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/elf 
-L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/dlfcn -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nss -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/rt -L/usr/src/packa
ges/BUILD/glibc-2.3/cc-nptl/resolv -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/crypt -L/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nptl -Wl,-rpath-link=/usr/src/packages/BUILD/glibc-2.3/cc-nptl:/usr/src/packages
/BUILD/glibc-2.3/cc-nptl/math:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/elf:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/dlfcn:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nss:/usr/src/packages/BUILD/glibc-2.3/cc-np
tl/nis:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/rt:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/resolv:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/crypt:/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nptl -o /usr/src/p
ackages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis.so -T /usr/src/packages/BUILD/glibc-2.3/cc-nptl/shlib.lds /usr/src/packages/BUILD/glibc-2.3/cc-nptl/csu/abi-note.o /usr/src/packages/BUILD/glibc-2.3/cc-nptl/csu/s
use-note.o -Wl,--whole-archive /usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a -Wl,--no-whole-archive /usr/src/packages/BUILD/glibc-2.3/cc-nptl/elf/interp.os /usr/src/packages/BUILD/glibc-2.3/cc
-nptl/nis/libnsl.so.1 /usr/src/packages/BUILD/glibc-2.3/cc-nptl/nss/libnss_files.so /usr/src/packages/BUILD/glibc-2.3/cc-nptl/libc.so /usr/src/packages/BUILD/glibc-2.3/cc-nptl/libc_nonshared.a 
/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a(nis-proto.os)(.text+0x1a): In function `internal_nis_endprotoent':
nss_nis/nis-proto.c:76: undefined reference to `___tls_get_addr'
/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a(nis-proto.os)(.text+0x93): In function `_nss_nis_endprotoent':
nss_nis/nis-proto.c:123: undefined reference to `___tls_get_addr'
/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a(nis-proto.os)(.text+0x417): In function `internal_nis_setprotoent':
nss_nis/nis-proto.c:98: undefined reference to `___tls_get_addr'
/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a(nis-proto.os)(.text+0x470): In function `_nss_nis_getprotoent_r':
nss_nis/nis-proto.c:137: undefined reference to `___tls_get_addr'
/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a(nis-proto.os)(.text+0x63e): In function `saveit':
nss_nis/nis-proto.c:60: undefined reference to `___tls_get_addr'
/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis_pic.a(nis-proto.os)(.text+0x65c):nss_nis/nis-proto.c:64: more undefined references to `___tls_get_addr' follow
collect2: ld returned 1 exit status
make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nis/libnss_nis.so] Error 1


-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Maxfeldstr. 5                 D-90409 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

  reply	other threads:[~2004-08-26 12:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26  9:58 Thorsten Kukuk
2004-08-26 10:20 ` Roland McGrath
2004-08-26 12:06   ` Thorsten Kukuk [this message]
2004-08-30  4:18     ` Roland McGrath
2004-09-08 16:38   ` Thorsten Kukuk
2004-09-08 20:40     ` Roland McGrath
2004-09-09  5:00       ` Thorsten Kukuk

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=20040826120638.GA20764@suse.de \
    --to=kukuk@suse.de \
    --cc=libc-hacker@sources.redhat.com \
    --cc=roland@redhat.com \
    /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).