Bug 940167 - More specificity for which mappings might be libraries on B2G. r=BenWa

Note that we don't want this extra check on regular Android, because
there's Dalvik jitcode in ashmem, and any mappings that aren't that
special ashmem file will already be excluded (because everything else is
handled through dl_iterate_phdr).
This commit is contained in:
Jed Davis 2013-11-19 09:00:24 -05:00
parent 63564db6cf
commit b2f74ca4eb

View File

@ -104,6 +104,13 @@ SharedLibraryInfo SharedLibraryInfo::GetInfoForSelf()
// no associated phdrs // no associated phdrs
if (strcmp(name, "/dev/ashmem/dalvik-jit-code-cache") != 0) if (strcmp(name, "/dev/ashmem/dalvik-jit-code-cache") != 0)
continue; continue;
#else
if (strcmp(perm, "r-xp") != 0) {
// Ignore entries that are writable and/or shared.
// At least one graphics driver uses short-lived "rwxs" mappings
// (see bug 926734 comment 5), so just checking for 'x' isn't enough.
continue;
}
#endif #endif
SharedLibrary shlib(start, end, offset, "", name); SharedLibrary shlib(start, end, offset, "", name);
info.AddSharedLibrary(shlib); info.AddSharedLibrary(shlib);