Re: vdso handling

Samuel Bronson
2014-06-01T20:32:46Z

Pedro Alves <palves@redhat.com> writes:

> On 03/13/2014 10:07 AM, Pedro Alves wrote:
>> Why's that? Why doesn't the memory-backed bfd paths take the same paths as
>> a file-backed bfd internally in bfd? It sounds to me that this should be
>> doable without duplication.
>
> BTW, I meant that for vDSO's only. The vsyscall page is not an elf,
> and therefore bfd still needs to be passed a template elf. For the
> latter, GDB would indeed need to work with the segments. Do we still
> care for vsyscall kernels? But for the former, bfd should just be
> able to read the whole DSO as a plain elf.
>
> Some glibc versions even include the vdso in the DSO list (*), and GDB
> should be able to tell that that DSO is the vDSO (by matching addresses), and
^^^^^^^^^^^^^^^^^^^^^
Hmm, why don't we already do that? It's bound to be easier than meeting
the conditions to get glibc to stop falsely cliaming that the vDSO comes
from a file <https://sourceware.org/bugzilla/show_bug.cgi?id=13097#c5>.

That'd be enough to take two bugs off of <http://bugs.debian.org/gdb>
right there.

> load it completely from memory, still using a memory backed bfd, but _without_
> a template. So with that in mind, bfd should be able to read the vdso
> as a bfd from memory using the same paths as a file-backed bfd, except,
> well, the bfd's backing store is in memory rather than in a file.
>
> (*) note how linux-vdso.so.1 is listed by ldd, even if "info shared" in gdb
> doesn't show it, on some systems.

What versions don't list the vdso under some name or other? (Mine calls
it linux-gate.so.1 for some reason.)

--
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!