aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Object/ObjectFile.h4
-rw-r--r--include/llvm/Support/Endian.h12
2 files changed, 15 insertions, 1 deletions
diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h
index 29b7077..e38c8c8 100644
--- a/include/llvm/Object/ObjectFile.h
+++ b/include/llvm/Object/ObjectFile.h
@@ -20,6 +20,7 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include <cstring>
+#include <vector>
namespace llvm {
namespace object {
@@ -337,7 +338,8 @@ public:
public:
static ObjectFile *createCOFFObjectFile(MemoryBuffer *Object);
- static ObjectFile *createELFObjectFile(MemoryBuffer *Object);
+ static ObjectFile *createELFObjectFile(MemoryBuffer *Object,
+ bool doDyld = false, std::vector<uint8_t*> *MemoryMap = 0);
static ObjectFile *createMachOObjectFile(MemoryBuffer *Object);
};
diff --git a/include/llvm/Support/Endian.h b/include/llvm/Support/Endian.h
index af1b506..733ab75 100644
--- a/include/llvm/Support/Endian.h
+++ b/include/llvm/Support/Endian.h
@@ -98,6 +98,9 @@ public:
operator value_type() const {
return endian::read_le<value_type, unaligned>(Value);
}
+ void operator=(value_type newValue) {
+ endian::write_le<value_type, unaligned>((void *)&Value, newValue);
+ }
private:
uint8_t Value[sizeof(value_type)];
};
@@ -108,6 +111,9 @@ public:
operator value_type() const {
return endian::read_be<value_type, unaligned>(Value);
}
+ void operator=(value_type newValue) {
+ endian::write_be<value_type, unaligned>((void *)&Value, newValue);
+ }
private:
uint8_t Value[sizeof(value_type)];
};
@@ -118,6 +124,9 @@ public:
operator value_type() const {
return endian::read_le<value_type, aligned>(&Value);
}
+ void operator=(value_type newValue) {
+ endian::write_le<value_type, aligned>((void *)&Value, newValue);
+ }
private:
value_type Value;
};
@@ -128,6 +137,9 @@ public:
operator value_type() const {
return endian::read_be<value_type, aligned>(&Value);
}
+ void operator=(value_type newValue) {
+ endian::write_be<value_type, aligned>((void *)&Value, newValue);
+ }
private:
value_type Value;
};