This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Fix vDSO l_name for GDB's: Can't read pathname for loadmap: Input/output error.
> The GDB-only solution would/will be to ignore any unreadable strings and after
> mapping in the DSOs with readable names to do a second r_map scanning pass.
>
> This time ld-linux.so's readonly segments will be mapped in and the vDSO's
> name (const char *) "" will be readable.
Right.
> ld.so coincidentally uses r/w memory for the later loaded DSOs, open_path()'s
> REALNAME is malloc()ated or in _dl_map_object it is local_strdup()ped etc.
Ah, yes. I skimmed the code yesterday but missed that.
> Not considering now a way to locate DSO by its build-id (which would work).
> The only other public location to be found in link_map is l_name.
Right.
> If l_name would really be omitted from the core file it is a chicken-and-egg
> problem how to find the DSO file where the DSO's filename is stored, isn't it?
Yes (modulo pure build ID solutions).
> GDB does not load DSOs according to the main executable's DT_NEEDED tags, it
> loads them just according to the r_map (which is right, isn't it?).
Yes, that is right.
Thanks,
Roland