[PATCH] D118494: [lldb] Observe SG_READ_ONLY flag in MachO binaries
Dave Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 28 15:58:24 PST 2022
kastiglione added inline comments.
================
Comment at: lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:1436
result |= ePermissionsReadable;
- if (seg_cmd.initprot & VM_PROT_WRITE)
+ if ((seg_cmd.initprot & VM_PROT_WRITE) && !(seg_cmd.flags & SG_READ_ONLY))
result |= ePermissionsWritable;
----------------
augusto2112 wrote:
> Could we add a new value in the enumeration? Something like ePermissionsLinkerWritable? As it is right now this would be dangerous for the existing file-cache optimization as we'd happily read pointers that are supposed to be fixed by the linker from the file-cache.
That works for me. I think we'd want `ePermissionsLoaderWritable`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118494/new/
https://reviews.llvm.org/D118494
More information about the llvm-commits
mailing list