[patch] Fix vDSO l_name for GDB's: Can't read pathname for load map: Input/output error.
Daniel Jacobowitz
drow@false.org
Mon Oct 5 00:00:00 GMT 2009
On Sun, Oct 04, 2009 at 06:17:06PM +0200, Jan Kratochvil wrote:
> else
> {
> /* Create a link_map for the executable itself.
> - This will be what dlopen on "" returns. */
> - main_map = _dl_new_object ((char *) "", "", lt_executable, NULL,
> + This will be what dlopen on "" returns.
> +
> + The memory pointed to by l_name should be accessible also from the
> + dumped core files where shared readonly segments are not present. */
> + main_map = _dl_new_object (&char_zero, "", lt_executable, NULL,
> __RTLD_OPENEXEC, LM_ID_BASE);
> assert (main_map != NULL);
> assert (main_map == GL(dl_ns)[LM_ID_BASE]._ns_loaded);
This only works by luck - because the static variable is likely to be
on a page with something else that caused a copy-on-write...
--
Daniel Jacobowitz
CodeSourcery
More information about the Libc-alpha
mailing list