[lld] r182515 - [lld] Fix wrong content permission bit.
Rui Ueyama
ruiu at google.com
Wed May 22 14:13:21 PDT 2013
Author: ruiu
Date: Wed May 22 16:13:21 2013
New Revision: 182515
URL: http://llvm.org/viewvc/llvm-project?rev=182515&view=rev
Log:
[lld] Fix wrong content permission bit.
Summary: "W" bit value was not consistent in ContentPermissions enum. It should always be 2.
Reviewers: kledzik
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D810
Modified:
lld/trunk/include/lld/Core/DefinedAtom.h
Modified: lld/trunk/include/lld/Core/DefinedAtom.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/DefinedAtom.h?rev=182515&r1=182514&r2=182515&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/DefinedAtom.h (original)
+++ lld/trunk/include/lld/Core/DefinedAtom.h Wed May 22 16:13:21 2013
@@ -146,14 +146,17 @@ public:
typeTLVInitializerPtr, // pointer to thread local initializer [Darwin]
};
+ // Permission bits for atoms and segments. The order of these values are
+ // important, because the layout pass may sort atoms by permission if other
+ // attributes are the same.
enum ContentPermissions {
perm___ = 0, // mapped as unaccessible
permR__ = 8, // mapped read-only
permRW_ = 8 + 2, // mapped readable and writable
- permR_X = 8 + 4, // mapped readable and executable
- permRWX = 8 + 4 + 2, // mapped readable and writable and executable
- permRW_L = 8 + 4 + 1, // initially mapped r/w, then made read-only
+ permRW_L = 8 + 2 + 1, // initially mapped r/w, then made read-only
// loader writable
+ permR_X = 8 + 4, // mapped readable and executable
+ permRWX = 8 + 2 + 4, // mapped readable and writable and executable
permUnknown = 16 // unknown or invalid permissions
};
More information about the llvm-commits
mailing list