__isthreaded is annoying for ARC++ and useless for everyone. Just hard-code
the value in ndk_cruft for LP32 and be done with it.
Bug: N/A
Test: builds
Change-Id: I08f11a404bbec55ed57cb1e18b5116163c7d7d13
greylist is needed only for application namepaces. Since we started using
linker-namesapces for vendors and other platform apps linker should not
enable greylist workaround by default.
Bug: http://b/37731053
Bug: https://issuetracker.google.com/38146125
Test: sailfish builds and boots
Test: bionic-unit-tests and linker-unit-tests pass
Change-Id: Iee83db6fb1ae754f5ade18491321d9bca3b5ead4
(cherry picked from commit e8ffe56a9c)
The kernel does seem to read some of the "unused" fields if only to do
basic validity checks.
valgrind complained about this, and I'm not convinced it's spurious.
Bug: http://b/38034461
Test: ran tests
Change-Id: I077fcc75bf0738491242166fc4576a9693ce18a5
There are new optimizations for these functions, so adding some extra
testing for these routines.
Also, clean up the strchr test slightly with some extra comments.
Test: Ran new tests on glibc version, and on angler.
Change-Id: I41bf4e5e2c84295cc1ce9d2226ed57c2d228d7b8
Switch raise to using tgkill with direct syscalls of getpid/gettid,
and switch abort to use raise(SIGABRT).
Bug: http://b/37769298
Test: debuggerd_test
Change-Id: If6f9d17fd8ae6177e742dc9f2f44bd78539431ba
Set correct values for PRIMARY and SECONDARY arch definitions
to match LE MIPS architectures.
This change is resolving boot problem for mips32 arch with 3.18 kernel.
This also fixes mips64 issue related to PRIMARY_ARCH definition,
but in order to boot to home screen it needs additional syscalls whitelisted
which will be introduced in separate patch.
Tested on emulator:
emulator -kernel prebuilts/qemu-kernel/mips/3.18/kernel-qemu2
Change-Id: I68dfd136c22141933a8a8c5336db01a02f00b0df
Since clang does not produce IRELATIVE relocations
this test started passing when we switched away from gcc
This is still a problem because it now leads to
situation where static ifuncs become globally visible
but this is a different problem.
Test: bionic-unit-tests --gtest_filer=dl*
Change-Id: Id27ba5093b88519c00acbc43ab8a991a671a9f51
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
Make shared namespace inherit namespace links and
search/permitted paths from the parent namespace.
Bug: http://b/37854032
Test: bionic_unit_tests --gtest_filter=dl*:Dl*
Change-Id: I174661d4a1dd0cbe4a378179073719aa955f3592
(cherry picked from commit ec43dd6c36)
After the new rebase of Clang, we now support the alloc_size attribute,
so we can remove the warning about switching to alloc_size once Clang
has support.
Also fix an issue where 'false' is returned in a main method.
Test: make cts
Bug: 37752547
Change-Id: I32ee814aaa0338567cb8174a68d7ee1bfece2f75
Mistakenly removed years ago, along with its genuinely duplicated companions.
This patch also redefines one of those rather than use the Linux uapi header
definition, which leads to signed/unsigned warnings in calling code.
Bug: https://github.com/android-ndk/ndk/issues/377
Test: ran tests
Change-Id: Ib25b17949f04969f12b945ca88ab87d080677cf9
Depending on how ld.config.txt is configured, there can be multiple
built-in namespaces created by the linker from the beginning of a
process. android_get_exported_namespace is a platform only API for
getting a handle (android_namespace_t*) to one of the built-in namespaces
with given name. The returned namespace can then be given to
android_dlopen_ext in order to explicitly specify the target namespace
where the library is searched and loaded from.
Note that this function only returns 'exported' namespaces created via
ld.config.txt file. In order to export a namespace, the visible property
should be set to true:
namespace.<name>.visible = true
Namespaces are hidden by default. Hidden namespaces and namespaces
that are created programmatically, notably 'classloader-namespace',
aren't returned by this function.
Bug: 36851137
Test: confirmed that namespaces created with ld.config.txt is retrieved.
Test: linker-unit-tests passes
Merged-in: I714b510fa24f77e42c3dfc4c827b3befa8bb2951
Change-Id: I0d05fa7e0e116009edf8ea362ab46774bc617cbf
(cherry picked from commit d7c4832e6a)
Replace an intentional leak of a buffer allocated by realpath with a use
of android::base::Realpath.
Bug: http://b/37727515
Test: tools/versioner/run_tests.py
Change-Id: Ia7200bf0e1c485050e860e21ff15784941366bec
Add a symlink where dependencies used to live, so that `versioner`
works.
Test: versioner
Test: tools/versioner/run_tests.py
Change-Id: I86999bb79baad16039709306591cb9540fb533ca
We have some non-upstream (but Android common kernel) scsi headers to include
in the NDK.
Bug: N/A
Test: checked out/soong/ndk/sysroot
Change-Id: If7611e1e554ada63f266ec99d95dfedb99562ae9
DlExtRelroSharingTest.VerifyMemorySaving verifies whether
android_dlopen_ext(ANDROID_DLEXT_USE_RELRO) really saves memory.
This patch compares Pss of the tested library rather than total
Pss of the process, in case different behavior of dlopen() and
android_dlopen_ext() introduces random Pss usage.
Test: DlExtRelroSharingTest.VerifyMemorySaving
Change-Id: I696eca736018fca5d9ec9385ac1c79ced280281d