#ifndef LLVM_SUPPORT_ELF_H
#define LLVM_SUPPORT_ELF_H
-#include "llvm/Support/DataTypes.h"
+#include "llvm/System/DataTypes.h"
#include <cstring>
namespace llvm {
ET_HIPROC = 0xffff // Processor-specific
};
+// Versioning
+enum {
+ EV_NONE = 0,
+ EV_CURRENT = 1
+};
+
// Machine architectures
enum {
EM_NONE = 0, // No machine
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.
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)
Elf32_Word p_align; // Segment alignment constraint
};
+// Segment types.
enum {
PT_NULL = 0, // Unused segment.
PT_LOAD = 1, // Loadable segment.
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