This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to detect symbol interposition?


I need a way to detect symbol interposition from within libc.

It seems that this is not directly distinguishable from interposition based on addresses alone:

#include <stdio.h>
#include <stdlib.h>

int
main (void)
{
  printf ("main malloc: %p\n", malloc);
}

If I have a hidden alias of malloc within libc (say, __libc_malloc), so that I can get the original address, it will be not equal to malloc because malloc in the entire process will point to the PLT stub. The PLT stub will call malloc, of course, but you cannot tell this from its address.

Any suggestions?

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]