summaryrefslogtreecommitdiffstats
path: root/runtime/elf_file_impl.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-04-07 16:09:30 -0700
committerAndreas Gampe <agampe@google.com>2015-04-07 16:43:08 -0700
commit3c54b0023fca579aae006dfa607fb14de5846c42 (patch)
tree7b996231875fdfd54855a9aa86fe2494cdee1ec5 /runtime/elf_file_impl.h
parent425ee0e1103b52bb72132df64f503725d1a15300 (diff)
downloadart-3c54b0023fca579aae006dfa607fb14de5846c42.zip
art-3c54b0023fca579aae006dfa607fb14de5846c42.tar.gz
art-3c54b0023fca579aae006dfa607fb14de5846c42.tar.bz2
ART: Fix 64-bit ELF file support
The API wasn't cross-compile-safe, 32-bit patchoat would fail for negative delta applied to a 64-bit ELF file. Add 64-bit ELF file output to the compilers, behind a flag, currently off by default (preserving current behavior). Bug: 20095017 Change-Id: I2cde7b4c7cc83413c76692d7b745868d644a604c
Diffstat (limited to 'runtime/elf_file_impl.h')
-rw-r--r--runtime/elf_file_impl.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/runtime/elf_file_impl.h b/runtime/elf_file_impl.h
index a70fa17..16d3857 100644
--- a/runtime/elf_file_impl.h
+++ b/runtime/elf_file_impl.h
@@ -19,6 +19,7 @@
#include <map>
#include <memory>
+#include <type_traits>
#include <vector>
// Explicitly include our own elf.h to avoid Linux and other dependencies.
@@ -102,13 +103,13 @@ class ElfFileImpl {
// executable is true at run time, false at compile time.
bool Load(bool executable, std::string* error_msg);
- bool Fixup(uintptr_t base_address);
- bool FixupDynamic(uintptr_t base_address);
- bool FixupSectionHeaders(uintptr_t base_address);
- bool FixupProgramHeaders(uintptr_t base_address);
- bool FixupSymbols(uintptr_t base_address, bool dynamic);
- bool FixupRelocations(uintptr_t base_address);
- bool FixupDebugSections(off_t base_address_delta);
+ bool Fixup(Elf_Addr base_address);
+ bool FixupDynamic(Elf_Addr base_address);
+ bool FixupSectionHeaders(Elf_Addr base_address);
+ bool FixupProgramHeaders(Elf_Addr base_address);
+ bool FixupSymbols(Elf_Addr base_address, bool dynamic);
+ bool FixupRelocations(Elf_Addr base_address);
+ bool FixupDebugSections(typename std::make_signed<Elf_Off>::type base_address_delta);
bool Strip(std::string* error_msg);