diff options
author | Erik Gilling <konkers@android.com> | 2009-07-28 20:28:19 -0700 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2009-07-28 20:36:47 -0700 |
commit | fde8642fc43bdd224e43e5ee9583a49a758fb03c (patch) | |
tree | 0c722ced21166d5b6a79cc7c0aa14d073934bdd4 /libm/man | |
parent | 22b5eb858dcbb537f2522ad920ca793348d574a2 (diff) | |
download | bionic-android-1.6_r1.3.zip bionic-android-1.6_r1.3.tar.gz bionic-android-1.6_r1.3.tar.bz2 |
bionic/linker: keep track of opened libraries by basenameandroid-sdk-tools_r2android-sdk-1.6_r2android-sdk-1.6_r1android-sdk-1.6-docs_r1android-1.6_r2android-1.6_r1.5android-1.6_r1.4android-1.6_r1.3android-1.6_r1.2android-1.6_r1.1android-1.6_r1
Prior to this change, the dynamic loader kept track of opened libraries
either by their base name (i.e., libfoo.so instead of /system/lib/libfoo.so)
when the shared library was loaded through the DT_NEEDED tag in an ELF header,
or by whatever name was passed to dlopen(). This created a number of problems,
among which:
1. dlopen("libfoo.so") and dlopen("/path/to/libfoo.so") would open the same
library twice;
2. dlopen("/path/to/libfoo.so") and then dlopen("libbar.so"), where libbar.so
depends on libfoo.so, would open libfoo.so twice.
This patch makes the dynamic loader keep track of each loaded library by
basename, which resolves the above ambiguity. The patch also enforces
library lookup by base name, which means that it will refuse to load another
library that has the same name.
Thanks for the inspiration Iliyan.
Signed-off-by: Erik Gilling <konkers@android.com>
Cc: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'libm/man')
0 files changed, 0 insertions, 0 deletions