MC: Move COFF enumeration constants to llvm/Support/COFF.h, patch by Michael
[oota-llvm.git] / include / llvm / Support / ELF.h
index 3552c872eeb2ea36cb3101113523001e47a6c376..d09db3998c4596eab6879b600ab8cef8c2e9c448 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef LLVM_SUPPORT_ELF_H
 #define LLVM_SUPPORT_ELF_H
 
-#include "llvm/Support/DataTypes.h"
+#include "llvm/System/DataTypes.h"
 #include <cstring>
 
 namespace llvm {
@@ -99,6 +99,12 @@ enum {
   ET_HIPROC = 0xffff  // Processor-specific
 };
 
+// Versioning
+enum {
+  EV_NONE = 0,
+  EV_CURRENT = 1
+};
+
 // Machine architectures
 enum {
   EM_NONE = 0,  // No machine
@@ -113,7 +119,8 @@ enum {
   EM_PPC = 20,     // PowerPC
   EM_ARM = 40,     // ARM
   EM_ALPHA = 41,   // DEC Alpha
-  EM_SPARCV9 = 43  // SPARC V9
+  EM_SPARCV9 = 43, // SPARC V9
+  EM_X86_64 = 62   // AMD64
 };
 
 // Object file classes.
@@ -128,6 +135,11 @@ enum {
   ELFDATA2MSB = 2  // Big-endian object file
 };
 
+// OS ABI identification -- unused.
+enum {
+  ELFOSABI_NONE = 0
+};
+
 // Section header.
 struct Elf32_Shdr {
   Elf32_Word sh_name;      // Section name (index into string table)
@@ -280,6 +292,7 @@ struct Elf32_Phdr {
   Elf32_Word p_align;  // Segment alignment constraint
 };
 
+// Segment types.
 enum {
   PT_NULL    = 0, // Unused segment.
   PT_LOAD    = 1, // Loadable segment.
@@ -292,6 +305,14 @@ enum {
   PT_HIPROC  = 0x7fffffff  // Highest processor-specific program hdr entry type.
 };
 
+// Segment flag bits.
+enum {
+  PF_X        = 1,         // Execute
+  PF_W        = 2,         // Write
+  PF_R        = 4,         // Read
+  PF_MASKPROC = 0xf0000000 // Unspecified
+};
+
 } // end namespace ELF
 
 } // end namespace llvm