Index: third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.h |
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.h b/third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.h |
index edf2f4bffd01e476f60f8e833c428a5c51c2ab01..1be4a203568b28b37d3e6e07ef84c7b0ddf71f0b 100644 |
--- a/third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.h |
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.h |
@@ -6,6 +6,7 @@ |
#define CRAZY_LINKER_ELF_RELOCATIONS_H |
#include <string.h> |
+#include <unistd.h> |
#include "elf_traits.h" |
@@ -43,6 +44,12 @@ class ElfRelocations { |
SymbolResolver* resolver, |
Error* error); |
+#ifdef __arm__ |
+ // Register ARM packed relocations to apply. |
+ // |arm_packed_relocs| is a pointer to packed relocations data. |
+ void RegisterArmPackedRelocs(uint8_t* arm_packed_relocs); |
+#endif |
+ |
// This function is used to adjust relocated addresses in a copy of an |
// existing section of an ELF binary. I.e. |src_addr|...|src_addr + size| |
// must be inside the mapped ELF binary, this function will first copy its |
@@ -94,6 +101,13 @@ class ElfRelocations { |
size_t map_addr, |
size_t size); |
+#ifdef __arm__ |
+ // Apply ARM packed relocations. |
+ // On error, return false and set |error| message. No-op if no packed |
+ // relocations were registered. |
+ bool ApplyArmPackedRelocs(Error* error); |
+#endif |
+ |
#if defined(__mips__) |
bool RelocateMipsGot(const ElfSymbols* symbols, |
SymbolResolver* resolver, |
@@ -119,6 +133,10 @@ class ElfRelocations { |
ELF::Word mips_gotsym_; |
#endif |
+#if defined(__arm__) |
+ uint8_t* arm_packed_relocs_; |
+#endif |
+ |
bool has_text_relocations_; |
bool has_symbolic_; |
}; |