History log of /bionic/libc/bionic/ndk_cruft.cpp
Revision Date Author Comments
c9734d24d92f4737f5ab3808c77d816a1b084582 09-Oct-2014 Christopher Ferris <cferris@google.com> Re-add dlmalloc for 32 bit.

It turns out that appportable has a version that calls dlmalloc directly.
Re-add the dlmalloc symbol for 32 bit only as a compatibility shim that
calls malloc.

Bug: 17881362
Change-Id: I8f20963b0b8d323489dc083e4063779e0d1d7447
51c8355d5cf4b83ccd2ad250ca4c61a616356c2b 08-Sep-2014 Elliott Hughes <enh@google.com> Add arc4random_addrandom binary compatibility.

This was in <stdlib.h> in older releases. It's no longer used, but we can
preserve backwards compatibility by making it a no-op.

Bug: 16205834
Change-Id: Idde7b46df4f253e39675600bcf82352879a716e7
1c365cb494d8cab1b639ecef21514425647e606b 06-Sep-2014 Christopher Ferris <cferris@google.com> Add dlmalloc_usable_size for 32 bit arches.

Bug: 17337831
Change-Id: I50c50559a5dfa083c85f064042bc0726718c988b
1e010d60397db706cd3d1c4d5701a2bced441aa8 04-Sep-2014 Elliott Hughes <enh@google.com> Add back a dummy arc4random_stir for compatibility.

The current arc4random implementation stirs itself as needed, but we
need to keep an arc4random_stir symbol around for binary compatibility.

Bug: 17291075
Change-Id: Iaf6171c3ec65c39c1868364d5b35ea280e29a363
59b0933e6d4cd9671ad3b6baeae424bc72c8ece0 06-Aug-2014 Elliott Hughes <enh@google.com> Explain how wcswcs ended up in ndk_cruft.cpp.

(cherry picked from commit 1628eb1d43008c52b00ec98d10c4fd9e8b6fc7c5)

Change-Id: I335b35038781d0426b3647727e6c4f22c83e187b
ac6467587e864d199377f14281da4641f979a68a 05-Jun-2014 Dan Albert <danalbert@google.com> Revert "Revert "Remove ftime from bionic LP64""

This reverts commit 0921204660b9597de795065d0350a787035ad589.

Change-Id: I749af8d7d429cda9f9d09a75bd30df54e6b1dd65
462abab12b074c62c0999859e65d5a32ebb41951 14-Jun-2014 Dan Albert <danalbert@google.com> Removes getdtablesize(3) from LP64.

getdtablesize(3) was removed fro POSIX 2004. Keep the symbol around in LP32 for
binary compatibility, but remove the declaration from unistd.h.

Bug: 13935372
Change-Id: I1f96cd290bf9176f922dad58bd5a7ab2cae7ef0f
891dedb935b50f1abb39eedfe33049a1e49283cb 13-Jun-2014 David 'Digit' Turner <digit@google.com> libc: Fix 'index' symbol export.

The C library didn't export the 'index' symbol, but its C++ name-mangling
instead, which broke the ABI and prevented some applications from loading
properly.

The main reason was that the implementation under bionic/index.cpp relied
on the declaration to specify that the function has C linkage.

However, the declaration for index() was removed from both <string.h>
and <strings.h> in a recent patch, which made the compiler think it was
ok to compile the function with C++ linkage instead!

This patch does the following:

- Move index() definition to bionic/ndk_cruft.cpp and ensure it uses
C linkage.

Note that this removes index() from the 64-bit library entirely, this
is intentional and will break source compatibility. Simply replacing
an index() call with the equivalent strchr() should be enough to fix
this in third-party code.

- Remove bionic/index.cpp from the tree and build files.

- Remove x86 assembly implementation from arch-x86/ to avoid conflict
with the one in ndk_cruft.cpp

BUG=15606653

Change-Id: I816b589f69c8f8a6511f6be6195d20cf1c4e8123
8229ae46f4fb165a18da4dca1be74c4c099c3ee7 14-Jun-2014 Dan Albert <danalbert@google.com> Removes wait3(2) from LP64.

wait3(2) was removed from POSIX 2004. Keep the symbol around in LP32 for binary
compatibility, but remove the declaration in sys/wait.h.

Bug: 13935372
Change-Id: Ic715fce6781aae43b4ac6d745dc6d1e6b9914e71
bffbfeed7a595dcbe5843a77d84c409a0225b4e1 07-Jun-2014 Elliott Hughes <enh@google.com> Add the missing issetugid binary compatibility stub.

Bug: 14569474
Change-Id: I3bedc1a0acf356af76424ceaf62ae7e85239f617
d1ead2af8bf2f6bb801da272e3778f89efefe613 07-Jun-2014 Elliott Hughes <enh@google.com> Fix ndk_cruft.cpp __getdents64 build failure.

Change-Id: Ia463113da0575b36b5a9935d8d45e7bd2c801357
3d5cb30d23cfc6a72f01c00246e69a2c614c8228 06-Jun-2014 Elliott Hughes <enh@google.com> Remove getdents from bionic.

Bug: 11156955
Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
205dd7d9b3ba314ef8601e4613823c2d62a0605b 04-Jun-2014 Dan Albert <danalbert@google.com> Remove bsd_signal and sysv_signal from bionic LP64.

bsd_signal was removed in POSIX 2008, sysv_signal was never POSIX.

Bug: 13935372
Change-Id: I7688e5cc317247ff075dcf99b598f515fb4f15c4
0921204660b9597de795065d0350a787035ad589 05-Jun-2014 Dan Albert <danalbert@google.com> Revert "Remove ftime from bionic LP64"

Breaking some build... will look in to it later.

This reverts commit 26d6799bbe170b0955f564974b584c1471efdca1.

Change-Id: I35fa770221be3a181bd37c6c3dce1bf37a69a4a1
26d6799bbe170b0955f564974b584c1471efdca1 05-Jun-2014 Dan Albert <danalbert@google.com> Remove ftime from bionic LP64

Bug: 13935372
Change-Id: I5dd31147143b23a090a3b75b846dc5354e599121
001f8f041bf21c53d4a0b919ef2c859b047bac0a 04-Jun-2014 Dan Albert <danalbert@google.com> Removes wcswcs from bionic for LP64.

Bug: 13935372
Change-Id: I0deb15e769da4fa81bb65a87f3c86db5163a5796
430cf1a6c32471ada4dad028acbfcc032da01fd3 03-Jun-2014 Elliott Hughes <enh@google.com> DO NOT MERGE fdprintf backward compatibility shim.

Fixes LP64 build.

Change-Id: Ic76005cd1f5a55344ea8ee3d070d25631d011037
b30aff405a220495941f1673b0a5e66c4fa8b84c 28-May-2014 Elliott Hughes <enh@google.com> Revert "Revert "Lose the hand-written futex assembler.""

The problem with the original patch was that using syscall(3) means that
errno can be set, but pthread_create(3) was abusing the TLS errno slot as
a pthread_mutex_t for the thread startup handshake.

There was also a mistake in the check for syscall failures --- it should
have checked against -1 instead of 0 (not just because that's the default
idiom, but also here because futex(2) can legitimately return values > 0).

This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to
pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) >
sizeof(uintptr_t), so we could potentially clobber other TLS slots too.)

I've also rewritten the LP32 compatibility stubs to directly reuse the
code from the .h file.

This reverts commit 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4.

Bug: 15195455
Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
001707363ddee680d466c88dd330900683dadf63 24-May-2014 Anthony King <anthonydking@slimroms.net> Restore tkill for LP32.

libmono from Unity still requires tkill(2).

Change-Id: I37a1994b08086c7fedb5c78ea0dadf2d72bc1463
Signed-off-by: Anthony King <anthonydking@slimroms.net>
bd3a98c6b9850a8e55fb0e0ed9f045212c494881 25-May-2014 Elliott Hughes <enh@google.com> Restore __futex_wake and __futex_wait for LP32.

Should fix Skype:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__futex_wake" referenced by "libsliq.so"...

Bug: 15196718
Change-Id: I8a18e18d830f0436e820cbde577121bd92710803
fcac8ff97f6b6cced6546e0096cadc1039b68b5e 22-May-2014 Elliott Hughes <enh@google.com> Switch to POSIX dprintf/vdprintf.

Bug: 11156955
Change-Id: I734bd02db514367ab119a48304aae9767958e367
eae5902e73dc4381811e08fd2334bf4a9300a928 23-Apr-2014 Elliott Hughes <enh@google.com> Remove strntoimax and strntoumax from the future.

Where do these turds come from?

Change-Id: Id9ad2cc85c6128aa63b5d56ff2aa455bde39a5eb
efbdb53f84f4e1faf38f3c1a4cb60a83b9885ef4 08-Apr-2014 Elliott Hughes <enh@google.com> Remove a non-standard turd: strtotimeval.

Change-Id: I1b1e40746cb573e3fb73a5276969b40c5da36d15
a4eafa6dbc98378f3fa759fec8590871e2b5ae29 10-Mar-2014 Calin Juravle <calin@google.com> Removed pthread_attr_getstackaddr/pthread_attr_setstackaddr

Moved existing definitions to ndk_cruft to preserve NDK compatibility.

Bug: 13281069
Change-Id: I6f260de69afa55a6274f0d13145c19ac6517b9d5
152b9de19ade833ada124390ef153e53d3d3e2ed 10-Mar-2014 Elliott Hughes <enh@google.com> Remove non-standard memswap.

Change-Id: I06548dda339987b755ef7139c590ca3e1f9fe0a9
0e44bc3baeb1677e5fbdda87a737b9c508c95132 25-Feb-2014 Elliott Hughes <enh@google.com> Remove <asm/page.h>.

If we have PAGE_SIZE/PAGESIZE, POSIX says they should be in <limits.h>.

Change-Id: I3c2d574ea2aea81f524874a156361411a4ffa18e
062092543fdbd6fa2676e4f5b37a15f7bba94332 07-Nov-2013 Elliott Hughes <enh@google.com> Clean up the 32-bit kernel support, fix LP64 fcntl declaration.

In practice, thanks to all the registers the stubs don't actually change,
but it's confusing to have an incorrect declaration.

I suspect that fcntl remains broken for aarch64; it happens to work for
x86_64 because the first vararg argument gets placed in the right register
anyway, but I have no reason to believe that's true for aarch64.

This patch adds a unit test, though, so we'll be able to tell when we get
as far as running the unit tests.

Change-Id: I58dd0054fe99d7d51d04c22781d8965dff1afbf3
567a8de3ca5b4c4f033bfbcdd339a3fd59a76227 25-Oct-2013 Elliott Hughes <enh@google.com> Start moving 32-bit cruft somewhere it won't pollute 64-bit.

Change-Id: I03a6a50a5243f29e50fb58a3cf8b5e7198640baa