Go to file
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
benchmarks Fix GCC 4.9 complaint about int/size_t mismatch. 2014-06-12 12:52:58 -07:00
libc libc: Fix 'index' symbol export. 2014-06-16 13:10:20 -07:00
libdl Turn on -Wunused and fix the mistakes it uncovers. 2014-06-03 15:22:34 -07:00
libm Merge "Move mips fenv implementation details into fenv.c." 2014-06-09 22:27:30 +00:00
libstdc++ Move libstdc++ into libc. 2014-05-14 18:18:55 -07:00
linker [MIPS64] linker64 requires startup code 2014-06-12 19:18:12 -07:00
tests Revert "Backing this one out since the counterpart needs to be sent upstream." 2014-06-14 01:04:31 +00:00
.gitignore Merge memory checking functionality from sandbox 2010-02-16 11:43:18 -08:00
ABI-bugs.txt PTHREAD_KEYS_MAX cleanup. 2013-12-12 12:51:08 -08:00
Android.mk Remove the simulator target from all makefiles. 2011-07-11 22:11:41 -07:00
CleanSpec.mk Add an empty CleanSpec.mk 2010-03-08 18:04:02 -08:00
HACKING.txt Clean up and document our hacks for building BSD source. 2014-04-21 17:13:46 -07:00