static void handle_maybe_load_notifier( const UChar* soname, HChar* symbol, Addr addr ) { # if defined(VGP_x86_linux) /* x86-linux only: if we see _dl_sysinfo_int80, note its address. See comment on declaration of VG_(client__dl_sysinfo_int80) for the reason. As far as I can tell, the relevant symbol is always in object with soname "ld-linux.so.2". */ if (symbol && symbol[0] == '_' && 0 == VG_(strcmp)(symbol, "_dl_sysinfo_int80") && 0 == VG_(strcmp)(soname, "ld-linux.so.2")) { if (VG_(client__dl_sysinfo_int80) == 0) VG_(client__dl_sysinfo_int80) = addr; } # endif /* Normal load-notifier handling after here. First, ignore all symbols lacking the right prefix. */ if (0 != VG_(strncmp)(symbol, VG_NOTIFY_ON_LOAD_PREFIX, VG_NOTIFY_ON_LOAD_PREFIX_LEN)) /* Doesn't have the right prefix */ return; if (VG_(strcmp)(symbol, VG_STRINGIFY(VG_NOTIFY_ON_LOAD(freeres))) == 0) VG_(client___libc_freeres_wrapper) = addr; else vg_assert2(0, "unrecognised load notification function: %s", symbol); }
static void handle_load_notifier( Char* symbol, Addr addr ) { if (VG_(strcmp)(symbol, STR(VG_NOTIFY_ON_LOAD(freeres))) == 0) __libc_freeres_wrapper = addr; // else if (VG_(strcmp)(symbol, STR(VG_WRAPPER(pthread_startfunc_wrapper))) == 0) // VG_(pthread_startfunc_wrapper)((Addr)(si->offset + sym->st_value)); else vg_assert2(0, "unrecognised load notification function: %s", symbol); }