[Ltrace-devel] DWARF prototypes: handling symbol aliases

Petr Machata pmachata at redhat.com
Fri Jul 25 11:08:06 UTC 2014


Dima Kogan <lists at dima.secretsauce.net> writes:

> I fixed this, and the tree now has another patch.

I merged your code.

I also fixed a bug where lib->dwfl_module was left uninitialized on
clone.  main-vfork.exp was failing on that (in fact it has been like
that for some time now).

> This somewhat makes sense: the nanosleep being called in this case lives
> in libpthread.so, not in libc6.so; and for some reason in Debian the
> debug symbols of libpthread.so have nothing about nanosleep (or
> __nanosleep, etc). But if this is so, then why does it work with -e and
> -l? Does it make sense to you? In any case, this wrinkle probably is
> independent of my changes, and it'd be great if you reviewed the tree.

Prototype lookup for PLT symbols in prototype libraries works on
assumption that name collisions don't happen.  If two libraries export
the same symbol, and each of them has a different prototype, then that's
a bug in the application.  So for -e, you just look into all prototype
libaries opened for the process.  For -x you still look into the
prototype library corresponding to the library itself.

Thanks,
P.



More information about the Ltrace-devel mailing list