libc: add optimized linaro bzero routine

Conflicts:
	libc/Android.mk
Revert "libc: add optimized linaro bzero routine"

This reverts commit bd15f027140ab971697e96aff85891b0a58f483a.
libc/arch-arm/cortex-a9/bionic/memcpy.S: Integrate cortex-strings memcpy.

This version of memcpy, taken from cortex-strings revision 103, improves
performance over the existing implementation on the majority of copies.

Benchmarks and tests for this routine can be found as part of the
cortex-strings project on Launchpad:

https://launchpad.net/cortex-strings

Change-Id: I7f6f77995f3ca903ad9c66d14261441667a2a935
Signed-off-by: Will Newton <will.newton@linaro.org>
libc: cleanup strchr

Move strchr to a .cpp file, and change to bionic directory.

Change-Id: I64ade7df326c0a9a714aca4caf5647b6833b1c97

Conflicts:
	tests/fortify2_test.cpp
bionic/x86: Optimization for string routines

Optimized strcpy, strcat,
strncpy, strncat, strlcpy, strlcat,
memchr, memrchr, strchr, strrchr, index,
strnlen, strlen, wcslen, wmemcmp, wcscmp,
wcschr, wcsrchr, wcscpy, wcscat

Change-Id: I82b29132edf9a2e144e0bb3ee4ff5217df8d2a6d
Signed-off-by: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
bionic: add linaro-a9 cortex-strings rev 54 strchr routine
cortex-a15 will use the a9 strchr as well due to still performing better than the c++ strchr. Generic uses the c++ AOSP
strchr
bionic: use optimized strchr for krait as well
bionic: add linaro-a9 cortex-strings rev 65 memchr routine
cortex-a15 will use the a9 memchr as well due to still performing better than the c memchr. Generic uses the c AOSP
memchr
libc: remove extra memchr
Bump the number of TLS slots to 128.

Bug: 9997352
Change-Id: I7bde7228d803e9d4bb83309c5891d54a07e3b025
Use GCC's __attribute__((const)) to reduce code size

__attribute__((const)) is mainly intended for the compiler to optimize
away repeated calls to a function that the compiler knows will return
the same value repeatedly.

By adding __attribute__((const)), the compiler can choose to call the
function just once and cache the return value.  Therefore, this yields
code size reduction.

Here are the reference results by arm-eabi-size for crespo device:

[before]
   text    data     bss     dec     hex filename
 267715   10132   45948  323795   4f0d3

[after]
   text    data     bss     dec     hex filename
 267387   10132   45948  323467   4ef8b

Change-Id: I1d80465c0f88158449702d4dc6398a130eb77195
bionic: Optimizations for gettimeofday and clock_gettime.

Use the kernel user helper feature to calculate the results
of gettimeofday and clock_gettime without actually calling
into kernel space. If the user helper patches have not been
applied to the kernel, the regular system calls are used as
a fallback.

Change-Id: I3aebc6ac19ab4743725648a1a279819e624cc5c4
bionic: Fix aliasing violations

This makes bionic compile with compilers enforcing
strict adherence to aliasing rules (e.g. gcc 4.6+
with -Wstrict-aliasing=2 -Werror=strict-aliasing).

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
remove typos and multiple declarations

Change-Id: Iff32874c2f801519b57f19a3cc1c2c76b7c7f6fa
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
libgcc_compat: Introduce __aeabi_lasr for cortex-a9

This is needed when passing -mcpu=cortex-a9 on a modern toolchain for
proprietary compatibility

Change-Id: I73eb2393377914ae26216a8c2828ad973d1c1225
libc: krait: Use performance version of memcpy.

Change-Id: I47d25d1da5b1a96bbc1b60f8acdaa31721a68e73
libc: krait: Restore prior version of strcmp.

Change-Id: I8ddcdb4d3a905dd746985435dcdb525ab5a1c947
libdl: disable LTO

Summary: Part of the global link time optimization patchset.

Test Plan: Apply all patches and win

Reviewers: randall.rushing, Mustaavalkosta, Roach, rlasalle15, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D241