[PATCH] [ELF] Add NMAGIC/OMAGIC support

Michael Spencer bigcheesegs at gmail.com
Thu Jun 13 13:30:57 PDT 2013



================
Comment at: include/lld/ReaderWriter/ELFTargetInfo.h:39-42
@@ +38,6 @@
+  enum Magic {
+    DEFAULT, // The default mode, no specific magic set
+    NMAGIC,  // Disallow shared libraries and dont align sections
+             // PageAlign Data, Mark Text Segment/Data segment RW
+    OMAGIC   // Disallow shared libraries and dont align sections,
+             // Mark Text Segment/Data segment RW
----------------
Use enum class.

================
Comment at: include/lld/ReaderWriter/ELFTargetInfo.h:49
@@ -41,2 +48,3 @@
   virtual uint64_t getPageSize() const { return 0x1000; }
+  uint8_t getOutputMagic() const { return _outputMagic; }
   uint16_t getOutputType() const { return _outputFileType; }
----------------
This should be the enum type.


http://llvm-reviews.chandlerc.com/D968



More information about the llvm-commits mailing list