static_link_warning (dlopen)
#endif
-void *
-dlopen_with_offset (const char *file, off_t offset, int mode)
-{
- return __dlopen_with_offset (file, offset, mode, RETURN_ADDRESS (0));
-}
-static_link_warning (dlopen_with_offset)
-
#else
struct dlopen_args
# endif
}
+# ifdef SHARED
void *
__dlopen_with_offset (const char *file, off_t offset, int mode DL_CALLER_DECL)
{
-# ifdef SHARED
if (!rtld_active ())
return _dlfcn_hook->dlopen_with_offset (file, offset, mode, DL_CALLER);
-# endif
-
- struct dlopen_args oargs;
- oargs.file = file;
- oargs.offset = offset;
- oargs.mode = mode;
- oargs.caller = DL_CALLER;
-
- return __dlopen_common (&oargs);
}
-# ifdef SHARED
strong_alias (__dlopen_with_offset, __google_dlopen_with_offset)
# endif
else
assert (r->r_state == RT_ADD);
+#ifdef SHARED
+ // This code could be linked into 'sln', which does not have _itoa.
+ // We only care about this when this is linked into ld-linux.
if (offset != 0)
{
/* Google-specific: to help GDB, and for b/18243822, turn realname
tmp[19] = '\0';
strcat(realname, _itoa(offset, &tmp[18], 16, 0));
}
+#endif
/* Enter the new object in the list of loaded objects. */
l = _dl_new_object (realname, (offset ? realname : name), l_type, loader, mode, nsid);