diff options
author | simonb@chromium.org <simonb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-20 14:34:24 +0000 |
---|---|---|
committer | simonb@chromium.org <simonb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-20 14:36:08 +0000 |
commit | d62a489312a43c9d55450b8b490cc1326cccf336 (patch) | |
tree | db5cadb93ca45ef89f26c7b509128208d64c1439 /third_party | |
parent | 6b0bc87b209680fbc5289332e78ed03a95f0e7d1 (diff) | |
download | chromium_src-d62a489312a43c9d55450b8b490cc1326cccf336.zip chromium_src-d62a489312a43c9d55450b8b490cc1326cccf336.tar.gz chromium_src-d62a489312a43c9d55450b8b490cc1326cccf336.tar.bz2 |
Fix argument passed to phdr_table_get_dynamic_section().
phdr_table_get_dynamic_section() expects to receive the load_bias_,
but ElfView::InitUnmapped() currently passes the load_address.
load_bias_ is calculated as
load_bias_ = load_address - min_vaddr;
As a result, the bug is only exposed when the crazy linker encounters
a library in which min_vaddr is not zero.
BUG=385553
Review URL: https://codereview.chromium.org/491433003
Cr-Commit-Position: refs/heads/master@{#290837}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/android_crazy_linker/README.chromium | 2 | ||||
-rw-r--r-- | third_party/android_crazy_linker/src/src/crazy_linker_elf_view.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/third_party/android_crazy_linker/README.chromium b/third_party/android_crazy_linker/README.chromium index 4153da5..6dc5095 100644 --- a/third_party/android_crazy_linker/README.chromium +++ b/third_party/android_crazy_linker/README.chromium @@ -41,3 +41,5 @@ Local Modifications: - Implement LEB128 decoding more efficiently. - Add support for unpacking relative relocations with addends, for arm64. + +- Fix phdr_table_get_dynamic_section() call in ElfView::InitUnmapped(). diff --git a/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.cpp b/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.cpp index 89d66e9..120f9aa 100644 --- a/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.cpp +++ b/third_party/android_crazy_linker/src/src/crazy_linker_elf_view.cpp @@ -29,7 +29,7 @@ bool ElfView::InitUnmapped(ELF::Addr load_address, // Extract the dynamic table information. phdr_table_get_dynamic_section(phdr, phdr_count, - load_address, + load_bias_, &dynamic_, &dynamic_count_, &dynamic_flags_); |