Skip early event

Daniel Jacobowitz drow at
Tue Feb 12 20:46:56 UTC 2008

This patch skips the first call to _dl_debug_state.  This one's
troublesome, because we have a non-empty list of shared libraries
(it's got the application on it), but we don't have the
interpreter on the list yet.  So the current location is code
that the debugger doesn't have symbols for.

In a perfect world this works anyway and the debugger doesn't mind
not having symbols.  In practice this is the second time I've
encountered a uClibc-only bug because of this call so I would suggest
removing it.  Glibc doesn't call _dl_debug_state until it is ready
to initialize directly linked and preloaded libraries.

Daniel Jacobowitz

2008-02-12  Daniel Jacobowitz  <dan at>

	* ldso/ldso/ldso.c (_dl_get_ready_to_run): Do not call _dl_debug_state
	before recording

Index: ldso/ldso/ldso.c
--- ldso/ldso/ldso.c	(revision 193179)
+++ ldso/ldso/ldso.c	(working copy)
@@ -470,9 +470,7 @@ void _dl_get_ready_to_run(struct elf_res
 	debug_addr->r_brk = (unsigned long) &_dl_debug_state;
 	_dl_debug_addr = debug_addr;
-	/* Notify the debugger we are in a consistant state */
-	_dl_debug_addr->r_state = RT_CONSISTENT;
-	_dl_debug_state();
+	/* Do not notify the debugger until the interpreter is in the list.  */
 	/* OK, we now have the application in the list, and we have some
 	 * basic stuff in place.  Now search through the list for other shared

More information about the uClibc mailing list