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

Unified Diff: third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp

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
« no previous file with comments | « third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp
diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp b/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp
index 4359548db16f86d6ccb1db2534481d0cb323c5c6..b509e16634f755a9957c840e10785e004ccfe672 100644
--- a/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp
+++ b/third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp
@@ -439,6 +439,9 @@ bool SharedLibrary::Load(const char* full_path,
LOG("%s: Packed relocations stored at %p\n",
__FUNCTION__,
packed_relocations_);
+
+ // Add packed relocations to the view.
+ view_.RegisterPackedRelocations(packed_relocations_);
}
#endif
@@ -458,10 +461,6 @@ bool SharedLibrary::Relocate(LibraryList* lib_list,
if (!relocations.Init(&view_, error))
return false;
-#if defined(__arm__) || defined(__aarch64__)
- relocations.RegisterPackedRelocations(packed_relocations_);
-#endif
-
SharedLibraryResolver resolver(this, lib_list, preloads, dependencies);
if (!relocations.ApplyAll(&symbols_, &resolver, error))
return false;
« no previous file with comments | « third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698