Intercept stpcpy also in ld.so for arm64

On other arches stpcpy () is intercepted for both libc.so and ld.so.
But not on arm64, where it is only intercepted for libc.so.

This can cause memcheck warnings about the use of stpcpy () in ld.so
when called through dlopen () because ld.so contains its own copy of
that functions.

Fix by introducing VG_Z_LD_LINUX_AARCH64_SO_1 (the encoded name of
ld.so on arm64) and using that in vg_replace_strmem.c to intercept
stpcpy.

https://bugs.kde.org/show_bug.cgi?id=407307
This commit is contained in:
Mark Wielaard
2019-05-07 21:20:04 +02:00
parent bd27ad3ff3
commit 89423f5d8b
3 changed files with 4 additions and 0 deletions

View File

@@ -313,7 +313,9 @@
#define VG_Z_LD_SO_1 ldZdsoZd1 // ld.so.1
#define VG_U_LD_SO_1 "ld.so.1"
#define VG_Z_LD_LINUX_AARCH64_SO_1 ldZhlinuxZhaarch64ZdsoZd1
#define VG_U_LD_LINUX_AARCH64_SO_1 "ld-linux-aarch64.so.1"
#define VG_U_LD_LINUX_ARMHF_SO_3 "ld-linux-armhf.so.3"
#endif