There's now only one place where we deal with this stuff, it only needs to
be parsed once by the dynamic linker (rather than by each recipient), and it's
now easier for us to get hold of auxv data early on.
Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5
I'll need at least one more pass, because there's some upstream code
lurking in libc/bionic, but this is still a step in the right direction.
Change-Id: I55927315972da8327ae01c5240ed587db17e8462
To properly support legacy ARM shared libraries, libc.so needs
to export the symbols __dso_handle and atexit, even though
these are now supplied by the crt startup code.
This patch reshuffles the existing CRT_LEGACY_WORKAROUND
conditionally compiled code slightly so it works as the
original author likely intended.
Change-Id: Id6c0e94dc65b7928324a5f0bad7eba6eb2f464b9
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
__cxa_finalize() modifies the access permissions of __atexit
global variable without acquiring _ATEXIT_LOCK(). Fix it prevent
any possible races.
Change-Id: I11939d0ebcbf6f360c14163222d40a449d96948e
In particular this affects assert(3) and __cxa_pure_virtual, both of
which have managed to confuse people this week by apparently aborting
without reason. (Because stderr goes nowhere, normally.)
Bug: 6852995
Bug: 6840813
Change-Id: I7f5d17d5ddda439e217b7932096702dc013b9142
Unfortunately, legacy .so files for ARM don't have a correct crtbegin file.
Consequently, we have to grandfather the old __dso_handle behaviour.
Add some ifdefs for ARM to allow it to use the old code until we can work
out a transition.
Change-Id: I6a28f368267d792c94e1d985d8344023bc632f6f
Author: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
The source file is not part of the C library build, so the Android.mk
is unaffected. In other words, this source file was never compiled.
Change-Id: Idec3d5b6ec30dc9ee38296d12dc6e522997df29a
Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.
Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
... by checking most probable condition first (elements do differ)
Change-Id: I424eab9c32a6d9eb82b686ca04025ec8c9097035
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
To avoid introducing NULL checks everytime a Bigint computation
is performed, introduce a special value (BIGINT_INVALID) and only
check for it when absolutely needed (which means when the code
needs to access the Bigint's internal structure fields).
Change-Id: Ie3954523b0985b6a8cb62340802d8dcf63cbf16f
Merge commit 'f197147a787d7415e6e0a1bad15566836c55befb'
* commit 'f197147a787d7415e6e0a1bad15566836c55befb':
Revert "Add qsort_r() implementation to the C library."
Merge commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e'
* commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e':
Add qsort_r() implementation to the C library.
This reverts commit 754c178ae5.
Turns out we don't need it afterall (needed a stable sort anyways).
So, we'll make that change in the dev branch instead.
NOTE: This replaces qsort.c with the FreeBSD version. While
the patch changes the source, it should not alter the
implementation that should use the exact same algorithm.