crazy linker: Fix RELRO sharing with packed relocations.
commit733a3f04a20043a7afb55c1a25d14dbaf869b913
authorsimonb <simonb@google.com>
Fri, 24 Apr 2015 11:55:41 +0000 (24 04:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 24 Apr 2015 11:55:54 +0000 (24 11:55 +0000)
treec3b058944a2fef6e4a58f689396b7ce96d0ee76f
parentfcf6c134d7a3db415bb0f748dddc96398c24c465
crazy linker: Fix RELRO sharing with packed relocations.

Packed relative relocations do not currently participate in
relocation of shared RELRO pages into a service process's load
addresses.  This undermines RELRO sharing, by reducing the
number of swapped RELRO pages (often to zero).

Fix by processing packed relative relocations a second time when
relocating shared RELRO pages.  Also, tidy up and rationalize
some duplicated code through use of templates.

BUG=385553

Review URL: https://codereview.chromium.org/1099253002

Cr-Commit-Position: refs/heads/master@{#326773}
third_party/android_crazy_linker/README.chromium
third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.cpp
third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.h
third_party/android_crazy_linker/src/src/crazy_linker_elf_view.h
third_party/android_crazy_linker/src/src/crazy_linker_shared_library.cpp