summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-10-01 09:09:17 -0700
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-10-01 09:09:17 -0700
commit5b6346f6d5dca4022fe0044dd2807c19ac596788 (patch)
treea857b9fcb602f4109a1f1b3235a01fedb2123a8a
parentd03bfe689a6e29aa010a927741f42c08f89ef04d (diff)
parent9c3449ecd9d5e9cdb1e995e35e53334a4a288a5e (diff)
downloadbionic-5b6346f6d5dca4022fe0044dd2807c19ac596788.zip
bionic-5b6346f6d5dca4022fe0044dd2807c19ac596788.tar.gz
bionic-5b6346f6d5dca4022fe0044dd2807c19ac596788.tar.bz2
Merge "bionic: linker: Need update the map->l_addr for execution."
-rw-r--r--linker/linker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 46d1335..998e608 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1916,6 +1916,12 @@ sanitize:
soinfo_call_constructors(preloads[i]);
}
+ /*After the link_image, the si->base is initialized.
+ *For so lib, the map->l_addr will be updated in notify_gdb_of_load.
+ *We need to update this value for so exe here. So Unwind_Backtrace
+ *for some arch like x86 could work correctly within so exe.
+ */
+ map->l_addr = si->base;
soinfo_call_constructors(si);
#if ALLOW_SYMBOLS_FROM_MAIN