[uClibc-cvs] uClibc/ldso/libdl Makefile, 1.35, 1.36 libdl.c, 1.37, 1.38

Erik Andersen andersen at uclibc.org
Thu Feb 12 08:51:24 UTC 2004


Update of /var/cvs/uClibc/ldso/libdl
In directory nail:/tmp/cvs-serv23730

Modified Files:
	Makefile libdl.c 
Log Message:
Based on a problem report and patch from Florian Schirmer, fix a compile
problem with mips -- contrary to my expectation gcc on mips _always_ defines
__PIC__ which breaks the assumption inherent in my code.  This should fix
things up.


Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/ldso/libdl/Makefile,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- Makefile	10 Feb 2004 09:26:57 -0000	1.35
+++ Makefile	12 Feb 2004 08:51:21 -0000	1.36
@@ -34,7 +34,7 @@
 XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp")
 XXFLAGS_NOPIC:=$(XXFLAGS)
 ifeq ($(DOPIC),y)
-    XXFLAGS += $(PICFLAG)
+    XXFLAGS += $(PICFLAG) -D__LIBDL_SHARED__
 endif
 ifeq ($(strip $(SUPPORT_LD_DEBUG)),y)
 XXFLAGS+=-D__SUPPORT_LD_DEBUG__

Index: libdl.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/libdl/libdl.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- libdl.c	10 Feb 2004 09:26:57 -0000	1.37
+++ libdl.c	12 Feb 2004 08:51:21 -0000	1.38
@@ -16,7 +16,7 @@
 void _dlinfo(void);
 
 
-#ifdef __PIC__
+#if defined (__LIBDL_SHARED__)
 /* This is a real hack.  We need access to the dynamic linker, but we
 also need to make it possible to link against this library without any
 unresolved externals.  We provide these weak symbols to make the link
@@ -64,7 +64,7 @@
 extern int   _dl_debug_file __attribute__ ((__weak__, __alias__ ("foobar1")));
 #endif
 
-#else	/* __PIC__ */
+#else	/* __LIBDL_SHARED__ */
 
 #ifdef __SUPPORT_LD_DEBUG__
 char *_dl_debug  = 0;
@@ -285,7 +285,7 @@
 	_dlinfo();
 #endif
 
-#ifdef __PIC__
+#if defined (__LIBDL_SHARED__)
 	/* Find the last library so we can run things in the right order */
 	for (tpnt = dyn_chain->dyn; tpnt->next!=NULL; tpnt = tpnt->next)
 	    ;




More information about the uClibc-cvs mailing list