Perhaps you recall the discussion here some months back about what hook to
use in Linux targets for the detection of the vsyscall DSO. The last time
I asked here about a resolution on how best to do this, I got no feedback.
I hope we can now jumpstart the effort to find the right way to implement
this. To get things rolling again, here is a patch that I am not
suggesting for inclusion, but does work. This is a kludge to overload the
solib hooks with target-specific code. These solib hooks get called at
roughly (or perhaps even precisely?) the correct places where the vsyscall
DSO checks ought to happen. A reminder, the appropriate places are when
gdb thinks the address space might be a fresh layout from what it knows,
i.e. first attach (or any attach?), after exec, and on opening a core file.
As I said, this code works for me. (It requires symbol_file_add_from_memory,
which is in the patch I just re-posted.) It seems doubtful this is the
ultimately desireable approach to wedging this code in where needs to be.
But it's what I've got, and as I said I'm still waiting for more feedback to
conclude on exactly what the preferred better thing to do is.