"for your Linux distribution to please in future ship a non-",
"stripped ld.so (or whatever the dynamic linker .so is called)",
"that exports the above-named function using the standard",
- "calling conventions for this platform.",
+ "calling conventions for this platform. The package you need",
+ "to install for fix (1) is called",
+ "",
+ " On Debian, Ubuntu: libc6-dbg",
+ " On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo",
NULL
};
/* If we're using memcheck, use this intercept right from the
start, otherwise ld.so (glibc-2.3.5) makes a lot of noise. */
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+ const HChar** mandatory;
+# if defined(GLIBC_2_2) || defined(GLIBC_2_3) || defined(GLIBC_2_4) \
+ || defined(GLIBC_2_5) || defined(GLIBC_2_6) || defined(GLIBC_2_7) \
+ || defined(GLIBC_2_8) || defined(GLIBC_2_9) \
+ || defined(GLIBC_2_10) || defined(GLIBC_2_11)
+ mandatory = NULL;
+# else
+ /* for glibc-2.12 and later, this is mandatory - can't sanely
+ continue without it */
+ mandatory = complain_about_stripped_glibc_ldso;
+# endif
add_hardwired_spec(
"ld-linux.so.2", "index",
- (Addr)&VG_(x86_linux_REDIR_FOR_index),
- NULL
- );
+ (Addr)&VG_(x86_linux_REDIR_FOR_index), mandatory);
+ add_hardwired_spec(
+ "ld-linux.so.2", "strlen",
+ (Addr)&VG_(x86_linux_REDIR_FOR_strlen), mandatory);
}
# elif defined(VGP_amd64_linux)
add_hardwired_spec(
"ld-linux.so.3", "strlen",
(Addr)&VG_(arm_linux_REDIR_FOR_strlen),
- NULL
+ complain_about_stripped_glibc_ldso
);
//add_hardwired_spec(
// "ld-linux.so.3", "index",
add_hardwired_spec(
"ld-linux.so.3", "memcpy",
(Addr)&VG_(arm_linux_REDIR_FOR_memcpy),
- NULL
+ complain_about_stripped_glibc_ldso
);
}
/* nothing so far */
# elif defined(VGP_ppc64_aix5)
/* nothing so far */
-# elif defined(VGO_darwin)
+# elif defined(VGP_x86_darwin)
+ /* If we're using memcheck, use these intercepts right from
+ the start, otherwise dyld makes a lot of noise. */
+ if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
+ add_hardwired_spec("dyld", "strcmp",
+ (Addr)&VG_(x86_darwin_REDIR_FOR_strcmp), NULL);
+ add_hardwired_spec("dyld", "strlen",
+ (Addr)&VG_(x86_darwin_REDIR_FOR_strlen), NULL);
+ add_hardwired_spec("dyld", "strcat",
+ (Addr)&VG_(x86_darwin_REDIR_FOR_strcat), NULL);
+ add_hardwired_spec("dyld", "strcpy",
+ (Addr)&VG_(x86_darwin_REDIR_FOR_strcpy), NULL);
+ add_hardwired_spec("dyld", "strlcat",
+ (Addr)&VG_(x86_darwin_REDIR_FOR_strlcat), NULL);
+ }
+
+# elif defined(VGP_amd64_darwin)
/* If we're using memcheck, use these intercepts right from
the start, otherwise dyld makes a lot of noise. */
if (0==VG_(strcmp)("Memcheck", VG_(details).name)) {
add_hardwired_spec("dyld", "strcmp",
- (Addr)&VG_(darwin_REDIR_FOR_strcmp), NULL);
+ (Addr)&VG_(amd64_darwin_REDIR_FOR_strcmp), NULL);
add_hardwired_spec("dyld", "strlen",
- (Addr)&VG_(darwin_REDIR_FOR_strlen), NULL);
+ (Addr)&VG_(amd64_darwin_REDIR_FOR_strlen), NULL);
add_hardwired_spec("dyld", "strcat",
- (Addr)&VG_(darwin_REDIR_FOR_strcat), NULL);
+ (Addr)&VG_(amd64_darwin_REDIR_FOR_strcat), NULL);
add_hardwired_spec("dyld", "strcpy",
- (Addr)&VG_(darwin_REDIR_FOR_strcpy), NULL);
+ (Addr)&VG_(amd64_darwin_REDIR_FOR_strcpy), NULL);
add_hardwired_spec("dyld", "strlcat",
- (Addr)&VG_(darwin_REDIR_FOR_strlcat), NULL);
-# if defined(VGP_amd64_darwin)
+ (Addr)&VG_(amd64_darwin_REDIR_FOR_strlcat), NULL);
// DDD: #warning fixme rdar://6166275
add_hardwired_spec("dyld", "arc4random",
- (Addr)&VG_(darwin_REDIR_FOR_arc4random), NULL);
-# endif
+ (Addr)&VG_(amd64_darwin_REDIR_FOR_arc4random), NULL);
}
+# elif defined(VGP_s390x_linux)
+ /* nothing so far */
+
# elif defined(VGO_l4re)
add_hardwired_active((Addr) SYSCALL_PAGE,
(Addr) (Addr) &VG_(x86_l4re_REDIR_FOR_syscall_page));
/* Normal load-notifier handling after here. First, ignore all
symbols lacking the right prefix. */
+ vg_assert(symbol); // assert rather than segfault if it is NULL
if (0 != VG_(strncmp)(symbol, VG_NOTIFY_ON_LOAD_PREFIX,
VG_NOTIFY_ON_LOAD_PREFIX_LEN))
/* Doesn't have the right prefix */