diff options
author | Eli Bendersky <eli.bendersky@intel.com> | 2012-01-22 09:01:03 +0000 |
---|---|---|
committer | Eli Bendersky <eli.bendersky@intel.com> | 2012-01-22 09:01:03 +0000 |
commit | 24973c1063bfb7ac353732a4e8eb801830336c5f (patch) | |
tree | a88cf6f0f24e0cac2b40062ec74ef433932958a0 /include/llvm/Support | |
parent | 76463fdeb603e1d89b05f094bfd6fe73b90d0b61 (diff) | |
download | external_llvm-24973c1063bfb7ac353732a4e8eb801830336c5f.zip external_llvm-24973c1063bfb7ac353732a4e8eb801830336c5f.tar.gz external_llvm-24973c1063bfb7ac353732a4e8eb801830336c5f.tar.bz2 |
Basic runtime dynamic loading capabilities added to ELFObjectFile, implemented
in a subclass named DyldELFObject. This class supports rebasing the object file
it represents by re-mapping section addresses to the actual memory addresses
the object was placed in. This is required for MC-JIT implementation on ELF with
debugging support.
Patch reviewed on llvm-commits.
Developed together with Ashok Thirumurthi and Andrew Kaylor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/Endian.h | 12 |
1 files changed, 12 insertions, 0 deletions
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; }; |