[Lldb-commits] [PATCH] D118494: [lldb] Observe SG_READ_ONLY flag in MachO binaries
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Feb 5 14:57:44 PST 2022
aprantl 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;
----------------
kastiglione wrote:
> 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`.
That sounds good.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118494/new/
https://reviews.llvm.org/D118494
More information about the lldb-commits
mailing list