History log of /bionic/linker/linker_soinfo.cpp
Revision Date Author Comments
9076b0c4e78e8680ce40ce48321e8ab81a87705b 28-Feb-2018 Elliott Hughes <enh@google.com> Be clearer about linker warnings.

Explicitly say "warning" for warnings, explicitly say what action
we're going to take (such as "(ignoring)"), always provide a link to
our documentation when there is one, explicitly say what API level the
behavior changes at, and explicitly say why we're allowing the misbehavior
for now.

Bug: http://b/71852862
Test: ran tests, looked at logcat
Change-Id: I1795a5af45deb904332b866d7d666690dae4340b
06016f226efe7aff2736643cb8e719c513948ecc 05-Jan-2018 dimitry <dimitry@google.com> Fix dlclose for libraries with thread_local dtors

Introduce new flag to mark soinfo as TLS_NODELETE when
there are thread_local dtors associated with dso_handle
belonging to it.

Test: bionic-unit-tests --gtest_filter=dl*
Test: bionic-unit-tests-glibc --gtest_filter=dl*
Bug: https://github.com/android-ndk/ndk/issues/360
Change-Id: I724ef89fc899788f95c47e6372c38b3313f18fed
965d06da1ed957c349dbdfcc7831b462b757bf85 28-Nov-2017 dimitry <dimitry@google.com> Fix logic in loading dependencies crossing namespace boundaries

This change addresses multiple problems introduced by
02586a2a34e6acfccf359b94db840f422b6c0231

1. In the case of unsuccessful dlopen the failure guard is triggered
for two namespaces which leads to double unload.

2. In the case where load_tasks includes libraries from 3 and more
namespaces it results in incorrect linking of libraries shared between
second and third/forth and so on namespaces.

The root cause of these problems was recursive call to find_libraries.
It does not do what it is expected to do. It does not form new load_tasks
list and immediately jumps to linking local_group. Not only this skips
reference counting it also will include unlinked but accessible library
from third (and fourth and fifth) namespaces in invalid local group. The
best case scenario here is that for 3 or more namesapces this will
fail to link. The worse case scenario it will link the library
incorrectly with will lead to very hard to catch bugs.

This change removes recursive call and replaces it with explicit list of
local_groups which should be linked. It also revisits the way we do
reference counting - with this change the reference counts are updated after
after libraries are successfully loaded.

Also update soinfo_free to abort in case when linker tries to free same
soinfo for the second time - this makes linker behavior less undefined.

Test: bionic-unit-tests
Bug: http://b/69787209
Change-Id: Iea25ced181a98c6503cce6e2b832c91d697342d5
7a3681e5b6c39bc2b3b62031ca5941dbf7bc4e63 25-Apr-2017 Christopher Ferris <cferris@google.com> Move libc_log code into libasync_safe.

This library is used by a number of different libraries in the system.
Make it easy for platform libraries to use this library and create
an actual exported include file.

Change the names of the functions to reflect the new name of the library.

Run clang_format on the async_safe_log.cpp file since the formatting is
all over the place.

Bug: 31919199

Test: Compiled for angler/bullhead, and booted.
Test: Ran bionic unit tests.
Test: Ran the malloc debug tests.
Change-Id: I8071bf690c17b0ea3bc8dc5749cdd5b6ad58478a
6705e8caf55834112ec46ac95d5b08ce499abe20 21-Mar-2017 Dimitry Ivanov <dimitry@google.com> Add systrace output for dlclose/dlsym calls

Bug: http://b/27195126
Test: manual: adb shell atrace -t 5 bionic
and run bionic-unit-tests --gtest_filter=dl*

Change-Id: I9e93a069dd440bb643890d9952913938442ac375
5c4a58072fad88a2ab89cfe063dd217041491357 18-Mar-2017 Dimitry Ivanov <dimitry@google.com> Add systrace output for dlopen calls

Bug: http://b/27195126
Test: manual: adb shell atrace -t 5 bionic
and run bionic-unit-tests --gtest_filter=dl*:Dl*

Change-Id: Ib2bad794e571b89bd1f52c9e0de642c2092e5c21
2a6d9b25437c42fd3e0284a6e7a607c842f59fe0 11-Mar-2017 Dimitry Ivanov <dimitry@google.com> Extract format_string function.

Extract format_string function and add a test.

Test: run linker-unit-tests
Change-Id: I794a29aaf62e184438ce1a9224b88aa0586c17b5
7a34b9d57a762ca7cd6b8d6b9f9fb45c2b991da7 03-Feb-2017 Dimitry Ivanov <dimitry@google.com> Replace public library list with shared lib sonames (part 2/2)

This commit updates interface of libdl.c.

1. android_init_namespaces is replaces with android_init_anonymous_namespace
2. added 2 arguments to android_create_namespace to specify linked namespace
and the list of shared libraries sonames.
3. symbol lookup does not get past boundary libraries (added check and test for it).

Bug: http://b/26833548
Bug: http://b/21879602
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I32921da487a02e5bd0d2fc528904d1228394bfb9
5bc78c8bcd0c1e634c04029309ede3ec05f2d424 16-Nov-2016 Elliott Hughes <enh@google.com> Add and use constants for the Android API levels.

Test: bionic tests still pass
Change-Id: If1b619cfc9db1d3f5d91f14f2ace71058dca0c4a
48ec288d40d272e6fe5e68c4c0a9778b55e24f8a 04-Aug-2016 Dimitry Ivanov <dimitry@google.com> Extract soinfo and globals to separate files.

Move soinfo and globals out of linker.cpp to
separate files.

Breaking up huge linker.cpp into smaller peaces
in order to make it easier to extract part of the
code that belongs to libdl.so and remove parts of
the code that do not belong to linker

(refactoring part 2 of many)

Change-Id: I868417f4b8d2b84d0e8265e354bc7977161497e2