Merge "Compare Pss of tested library in VerifyMemorySaving"
diff --git a/libdl/libdl.c b/libdl/libdl.c
index 6a95629..f7ca3f1 100644
--- a/libdl/libdl.c
+++ b/libdl/libdl.c
@@ -128,6 +128,11 @@
}
#endif
+/*
+ * This needs to be defined as weak because it is also defined in libc.a.
+ * Without this, static executables will have a multiple definition error.
+ */
+__attribute__((__weak__))
int dl_iterate_phdr(int (*cb)(struct dl_phdr_info* info, size_t size, void* data), void* data) {
return __loader_dl_iterate_phdr(cb, data);
}
diff --git a/tests/sys_ptrace_test.cpp b/tests/sys_ptrace_test.cpp
index 69638be..00322ec 100644
--- a/tests/sys_ptrace_test.cpp
+++ b/tests/sys_ptrace_test.cpp
@@ -266,7 +266,7 @@
ASSERT_EQ(0, sigaction(SIGALRM, &action, &oldaction)) << strerror(errno);
alarm(5);
- run_watchpoint_test<Uint128_t>(watchpoint_imprecise_child, 8, 8);
+ run_watchpoint_test<Uint128_t>(watchpoint_imprecise_child, 8, sizeof(void*));
ASSERT_EQ(0, sigaction(SIGALRM, &oldaction, nullptr)) << strerror(errno);
}