public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: libc-hacker@sources.redhat.com
Subject: Fix building with linuxthreads/--without-__thread on ia64
Date: Tue, 10 Aug 2004 23:55:00 -0000	[thread overview]
Message-ID: <jellgmsg9m.fsf@sykes.suse.de> (raw)

When building libc_pic_lite.so in linuxthreads there is an undefined
reference to __res_initstamp in res_init.os which would normally be
resolved with res_libc.os, but the latter is explicitly removed from the
link.  Since __res_initstamp is hidden you'll get a @gprel reference which
is not allowed in shared libraries.  Solved by moving the definition of
__res_initstamp to res_init.c

Andreas.

2004-08-11  Andreas Schwab  <schwab@suse.de>

	* resolv/res_libc.c: Move definition of __res_initstamp ...
	* resolv/res_init.c: ... here.

--- resolv/res_init.c	06 Aug 2004 11:20:18 +0200	1.37
+++ resolv/res_init.c	11 Aug 2004 01:34:19 +0200	
@@ -106,6 +106,10 @@ static u_int32_t net_mask __P((struct in
 # define isascii(c) (!(c & 0200))
 #endif
 
+#ifdef _LIBC
+unsigned long long int __res_initstamp attribute_hidden;
+#endif
+
 /*
  * Resolver state default settings.
  */
@@ -162,7 +166,6 @@ __res_vinit(res_state statp, int preinit
 	int dots;
 #endif
 #ifdef _LIBC
-	extern unsigned long long int __res_initstamp attribute_hidden;
 	statp->_u._ext.initstamp = __res_initstamp;
 #endif
 
--- resolv/res_libc.c	07 Aug 2004 09:30:08 +0200	1.20
+++ resolv/res_libc.c	11 Aug 2004 01:32:56 +0200	
@@ -28,7 +28,7 @@
    out) since res_init() should go into libc.so but the rest of that
    file should not.  */
 
-unsigned long long int __res_initstamp attribute_hidden;
+extern unsigned long long int __res_initstamp attribute_hidden;
 /* We have atomic increment operations on 64-bit platforms.  */
 #if __WORDSIZE == 64
 # define atomicinclock(lock) (void) 0

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

             reply	other threads:[~2004-08-10 23:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-10 23:55 Andreas Schwab [this message]
2004-08-13  5:45 ` Ulrich Drepper
2004-08-13  7:14   ` Jakub Jelinek
2004-08-13  7:56     ` Ulrich Drepper

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=jellgmsg9m.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=libc-hacker@sources.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).