bionic/libc
David 'Digit' Turner 891dedb935 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
2014-06-16 13:10:20 -07:00
..
arch-arm libc: Fix 'index' symbol export. 2014-06-16 13:10:20 -07:00
arch-arm64 Remove __memcmp16 from bionic. 2014-06-12 15:35:22 -07:00
arch-common/bionic Fixes for __cxa_finalize 2014-05-05 11:36:57 -07:00
arch-mips libc: Fix 'index' symbol export. 2014-06-16 13:10:20 -07:00
arch-mips64 Remove __memcmp16 from bionic. 2014-06-12 15:35:22 -07:00
arch-x86 libc: Fix 'index' symbol export. 2014-06-16 13:10:20 -07:00
arch-x86_64 Remove __memcmp16 from bionic. 2014-06-12 15:35:22 -07:00
bionic libc: Fix 'index' symbol export. 2014-06-16 13:10:20 -07:00
dns Somewhere, the declaration of _resolv_delete_cache_for_net went missing. 2014-06-12 18:40:06 -07:00
include Revert "Revert "Remove ftime from bionic LP64"" 2014-06-16 12:32:38 -07:00
kernel Remove unused scripts. 2014-06-06 15:28:42 -07:00
private Adds functionality specified by uchar.h 2014-06-04 08:39:24 -07:00
stdio Expose __srefill for LP64 until we can fix the NDK. 2014-05-27 21:23:36 -07:00
stdlib Register _cleanup function with atexit 2014-05-15 13:05:21 -07:00
tools Bring our "libresolv" stuff in line with glibc. 2014-06-13 11:50:07 -07:00
tzcode Fix most of the tzcode warnings. 2014-06-11 17:15:56 -07:00
unistd Hide non-standard syslog API. 2014-06-09 17:42:14 -07:00
upstream-dlmalloc Put all allocation functions into dispatch table. 2014-06-12 15:08:18 -07:00
upstream-freebsd Register _cleanup function with atexit 2014-05-15 13:05:21 -07:00
upstream-netbsd Get the full set of PRNG functions in <stdlib.h> 2014-06-12 14:37:31 -07:00
upstream-openbsd Removes wcswcs from bionic for LP64. 2014-06-04 12:01:56 -07:00
zoneinfo Upgrade to tzdata2014e. 2014-06-13 10:55:19 -07:00
Android.mk Revert "Revert "Remove ftime from bionic LP64"" 2014-06-16 12:32:38 -07:00
crt.mk Reconfig libc's Android.mk to build for multilib 2014-02-12 13:58:34 -08:00
MODULE_LICENSE_BSD auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
NOTICE Update the NOTICE files and improve the script slightly. 2014-05-05 16:23:15 -07:00
SYSCALLS.TXT Remove ioprio_get(2) and ioprio_set(2) from LP64. 2014-06-12 18:10:13 -07:00