Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h

Issue 1099253002: crazy linker: Fix RELRO sharing with packed relocations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to master. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h b/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h
index 6c62d1dfc21e9cc5839420fd061524a3358e0a93..8166123c83408f59ef7ad12cc93945dabb92de78 100644
--- a/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h
@@ -93,6 +93,16 @@ class ElfView {
// ELF binary is mapped.On failure, return false and set |error| message.
bool ProtectRelroSection(Error* error);
+#if defined(__arm__) || defined(__aarch64__)
+ // Register packed relocations to apply.
+ // |packed_relocs| is a pointer to packed relocations data.
+ void RegisterPackedRelocations(uint8_t* packed_relocations) {
+ packed_relocations_ = packed_relocations;
+ }
+
+ uint8_t* packed_relocations() const { return packed_relocations_; }
+#endif
+
protected:
const ELF::Phdr* phdr_;
size_t phdr_count_;
@@ -102,6 +112,10 @@ class ElfView {
ELF::Addr load_address_;
size_t load_size_;
size_t load_bias_;
+
+#if defined(__arm__) || defined(__aarch64__)
+ uint8_t* packed_relocations_;
+#endif
};
} // namespace crazy

Powered by Google App Engine
This is Rietveld 408576698