open(2) can be used to open directories; use stat to
check that the file exists and is a regular file.
Addresses review comments for 5aa67675f8
Bug: http://b/30320104
Change-Id: Ia944db2f2f779a87ea01dd41dcd171e59c9bef01
This patch enables absolute path translation to instrumented library
when linker_asan is in use.
Test: adb shell cat /proc/<rlid pid>/maps | grep libril-qc-qmi-1.so
check that it is mapped from /data/vendor/lib64 and not /vendor/lib64
Bug: http://b/30320104
Change-Id: I3bc24754b192afc0a72d6f3801f7b42141ce715b
(cherry picked from commit 5aa67675f8)
Give a compile time diagnostic when the nullptr sentinel is missing
from an execl family call, instead of just pulling arbitrary values.
Bug: http://b/30793878
Change-Id: I1c49005c58b7ad4a5b04f0435b722d4c744e8f0e
Test: Built bullhead
Hiding our legacy cruft seemed like a good idea, but in practice it will only
mean worse interoperability.
Plus we got it wrong, as the recent `putw` example showed.
Change-Id: I167c7168eff133889028089c22a7a0dfb8d6d0cf
Improve sanity-checks of elf-file by adding alignment check
of mapped sections and section headers.
Bug: http://b/30687964
Change-Id: I7f06ddaa56a13989ce7be847b3a73c352e32c008
(cherry picked from commit 7e2d49ae3e)
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
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 1 of many)
Change-Id: I57ac36677a815800dc127c8c45c3ea806c37e247
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
This assumes that it's more likely we're unlinking a file than a directory,
though even if that's not true, as long as a failed unlink(2) is cheaper
than a successful lstat(2) -- which seems likely since there's no data to
copy -- we still win.
Change-Id: I0210e9cd3d31b8cf1813c55c810262ef327382ed
Bionic stdatomic.h is also used for the host (via a copy in
prebuilts/clang). Revert to guarding the include of uchar.h based on
__STDC_VERSION__, so it is included only when needed.
Change-Id: I5b45c7f5d16da223478512104702a3e4e5a975ae
Test: bionic tests on host and Angler. Confirmed failures I am
seeing are KIs.
* changes:
Add version information for legacy inlines.
versioner: remove unnecessary kernel/common symlink.
versioner: add symlink for kernel/android/uapi.
With the introduction of new tags for ndk_library, we'll have a lot
of tags that aren't architecture tags. If we have something tagged
`introduced=21`, it should be in all architectures.
Change-Id: Ib67f07db14625f6903919c181050316eb183bed5
The target was moved by commit 5956b4e, but none of the headers
contained were actually necessary to compile any bionic headers.
Bug: http://b/30170081
Change-Id: I8c1a7464de0992c20af194340c0e36d131a836e7
The android-only kernel headers were moved to their own directory by
commit d6e8b8c. Add a new symlink to match.
Change-Id: I06ce7c3167fbb1e058e4a137fae9375bb5792a46
With this change (and all the others below it in the stack), the only
difference between the arm android-9 libc.so in r13-beta1 and the one
we are now generating is the addition of LIBC_N and LIBC_O versions.
Test: make ndk, readelf stub libc.so to check symbol exists
Bug: https://github.com/android-ndk/ndk/issues/160
Change-Id: Iedab32592b2d979f3cc922ffd4ed406427de3dda
These functions were erroneously released in LIBC_PRIVATE for M, but
in fact need to be public. Since we need to be able to load them on M
even if they were built for a lower platform (and M needs to load on
newer platforms), we need to unversion them.
Change-Id: I333fe8ae7380cc2a5dbd699414399ec52f602383