[PATCH 0/4] _r_debug copy relocation support
H.J. Lu
hjl.tools@gmail.com
Thu Dec 23 21:50:38 GMT 2021
On Thu, Dec 23, 2021 at 1:00 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > On Thu, Dec 23, 2021 at 11:59 AM Florian Weimer <fweimer@redhat.com> wrote:
> >>
> >> * H. J. Lu:
> >>
> >> > On Thu, Dec 23, 2021 at 10:43 AM Florian Weimer via Libc-alpha
> >> > <libc-alpha@sourceware.org> wrote:
> >> >>
> >> >> I implemented this because we received a bug that the _r_debug extension
> >> >> mechanism broke dyninst. But it turns out it wasn't because of a copy
> >> >> relocation: dyninst has its own interposing *definition* of _r_debug, so
> >> >> the patch series doesn't solve this. It can only handle an interposing
> >> >> definition in the main executable, not one in shared object (although I
> >> >> guess in theory we could fix this).
> >> >
> >> > Why doesn't GDB suffer from this issue?
> >>
> >> I expect that GDB uses DT_DEBUG, and that's not subject to
> >> interposition, as before.
> >
> > Can dyninst also use DT_DEBUG?
>
> Not easily. They can keep using _r_debug if they just remove their
> local definition.
DT_DEBUG is easily accessible. I'd rather fix dyninst than add hacks
in ld.so.
--
H.J.
More information about the Libc-alpha
mailing list