This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


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

[PATCH,HURD] dl-sysdep.c: Include code only #ifdef SHARED


Hello,

Since 2008-03-08's "elf/Makefile (routines): Add dl-sysdep
(elide-routines.os): Likewise", dl-sysdep.c is also included in libc.a,
so we need to include the dynamic loading code (which happens to be
the whole file) only #ifdef SHARED, just like Ulrich did for Linux:
sysdeps/unix/sysv/linux/dl-sysdep.c: Avoid unnecessary code for .o file.

(else static linking fails due to duplicate and missing symbols).

Samuel

2009-01-31  Samuel Thibault  <samuel.thibault@ens-lyon.org>

	* sysdeps/mach/hurd/dl-sysdep.c: Include code only #ifdef SHARED.

Index: sysdeps/mach/hurd/dl-sysdep.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/dl-sysdep.c,v
retrieving revision 1.79
diff -u -p -r1.79 dl-sysdep.c
--- sysdeps/mach/hurd/dl-sysdep.c	2 Jul 2008 19:34:58 -0000	1.79
+++ sysdeps/mach/hurd/dl-sysdep.c	30 Jan 2009 01:42:08 -0000
@@ -42,6 +42,8 @@
 #include <dl-machine.h>
 #include <dl-procinfo.h>
 
+#ifdef SHARED
+
 extern void __mach_init (void);
 
 extern int _dl_argc;
@@ -668,3 +670,5 @@ _dl_init_first (int argc, ...)
 {
   /* This no-op definition only gets used if libc is not linked in.  */
 }
+
+#endif /* SHARED */


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