This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix building with linuxthreads/--without-__thread on ia64


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]