[uClibc-cvs] uClibc/ldso/ldso ldso.c,1.57,1.58

Erik Andersen andersen at codepoet.org
Wed Dec 4 05:47:33 UTC 2002


Update of /var/cvs/uClibc/ldso/ldso
In directory winder:/tmp/cvs-serv20778/ldso/ldso

Modified Files:
	ldso.c 
Log Message:
Looks like this is in fact needed to properly debug dynamically 
linked stuff, so put it back but add a check for NULL


Index: ldso.c
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/ldso.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- ldso.c	28 Nov 2002 15:21:10 -0000	1.57
+++ ldso.c	4 Dec 2002 05:47:30 -0000	1.58
@@ -209,6 +209,7 @@
 	Elf32_auxv_t auxvt[AT_EGID + 1];
 	unsigned char *malloc_buffer, *mmap_zero;
 	Elf32_Dyn *dpnt;
+	Elf32_Dyn *dpnt_debug = NULL;
 	unsigned long *hash_addr;
 	struct r_debug *debug_addr;
 	int indx;
@@ -431,6 +432,8 @@
 					if (dpnt->d_tag == DT_DEBUG)
 #ifdef FORCE_SHAREABLE_TEXT_SEGMENTS
 						dpnt->d_un.d_val = (unsigned long) debug_addr;
+#else
+						dpnt_debug = dpnt;
 #endif
 					if (dpnt->d_tag == DT_TEXTREL)
 						app_tpnt->dynamic_info[DT_TEXTREL] = 1;
@@ -482,6 +485,11 @@
 								 PROT_READ | PROT_WRITE | PROT_EXEC);
 			}
 		}
+	}
+
+	/* Now we can store the debug structure address */
+	if (dpnt_debug != NULL) {
+		dpnt_debug->d_un.d_val = (unsigned long) debug_addr;
 	}
 #endif
 




More information about the uClibc-cvs mailing list