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]

Re: [patch] Fix vDSO l_name for GDB's: Can't read pathname forload map: Input/output error.


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


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