diff options
author | Nick Kledzik <kledzik@apple.com> | 2013-09-04 23:53:44 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2013-09-04 23:53:44 +0000 |
commit | a38c27be0ff5dd35fcd20cfce827f9dbdb24d1ea (patch) | |
tree | 8aa56c9bbf7d06fa661ab00768c0d7cda5995540 /lib/MC | |
parent | 5afaf5d1c1879d5cfbb3230dcb56297bd886bda4 (diff) | |
download | external_llvm-a38c27be0ff5dd35fcd20cfce827f9dbdb24d1ea.zip external_llvm-a38c27be0ff5dd35fcd20cfce827f9dbdb24d1ea.tar.gz external_llvm-a38c27be0ff5dd35fcd20cfce827f9dbdb24d1ea.tar.bz2 |
Add names for mach-o permissions bits and use the symbol names in place of magic numbers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MachObjectWriter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp index d0bfc65..3531ab2 100644 --- a/lib/MC/MachObjectWriter.cpp +++ b/lib/MC/MachObjectWriter.cpp @@ -185,8 +185,10 @@ void MachObjectWriter::WriteSegmentLoadCommand(unsigned NumSections, Write32(SectionDataStartOffset); // file offset Write32(SectionDataSize); // file size } - Write32(0x7); // maxprot - Write32(0x7); // initprot + // maxprot + Write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE); + // initprot + Write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE); Write32(NumSections); Write32(0); // flags |