linux: Add linux-gate.so to valid vdso prefixes

The name of the vdso varies by ABI and in particular begins with
linux-gate.so when targeting i386.

Change-Id: Icd9d25aa2ad44b00fed1e4088fe72f77a505f445
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2570143
Commit-Queue: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Joshua Peraza 2020-12-03 15:52:09 -08:00 committed by Commit Bot
parent 00491d58ee
commit 83f194ee85

View File

@ -188,7 +188,11 @@ void TestAgainstTarget(PtraceConnection* connection) {
const std::string& module_name) {
const bool is_vdso_mapping =
device == 0 && inode == 0 && mapping_name == "[vdso]";
#if defined(ARCH_CPU_X86)
static constexpr char kPrefix[] = "linux-gate.so.";
#else
static constexpr char kPrefix[] = "linux-vdso.so.";
#endif
return is_vdso_mapping ==
(module_name.empty() ||
module_name.compare(0, strlen(kPrefix), kPrefix) == 0);