linker: Avoid logcat spam with some blobs

Many of pre-kitkat blobs would emit a "text relocations" warning which makes logcat completely unreadable.
This commit will hide this warning to prevent it.

Change-Id: I8f32b5bbfea33d732320b3ac29da6b0027fbd521
libc: krait: Use performance version of bcopy and memmove

Ported from CM10.2.

bionic-benchmarks on mako:
before:
                     iterations      ns/op
BM_string_memmove/8    50000000         32   243.54 MiB/s
BM_string_memmove/64   20000000        143   446.41 MiB/s
BM_string_memmove/512    2000000        885   578.14 MiB/s
BM_string_memmove/1K    1000000       1733   590.55 MiB/s
BM_string_memmove/8K     200000      13618   601.54 MiB/s
BM_string_memmove/16K     100000      27276   600.66 MiB/s
BM_string_memmove/32K      50000      59115   554.30 MiB/s
BM_string_memmove/64K      10000     118162   554.63 MiB/s

after:
                     iterations      ns/op
BM_string_memmove/8    50000000         20   381.94 MiB/s
BM_string_memmove/64  100000000         17  3636.07 MiB/s
BM_string_memmove/512   50000000         50 10116.80 MiB/s
BM_string_memmove/1K   20000000         98 10429.23 MiB/s
BM_string_memmove/8K    2000000        876  9346.43 MiB/s
BM_string_memmove/16K    1000000       1836  8923.09 MiB/s
BM_string_memmove/32K     500000       4392  7459.79 MiB/s
BM_string_memmove/64K     200000       8562  7653.85 MiB/s

Change-Id: Id64913a71857d9cfdf6bd1bbe2c66cfc49d72748
Merge tag 'android-4.4.1_r1' into kitkat

Android 4.4.1 Release 1
Fix the detection of alt-network in dns resolver.

Used to determine proper A/AAAA record request.

bug:10132565
Change-Id: I7229f6672e879920a6fae58672cddd72db78546c

Conflicts:
	libc/netbsd/net/getaddrinfo.c
Add ssse3 implementation of __memcmp16.

__memcmp16 was missing in x86. Also added C-version for backward
compatibility. Added bionic test for __memcmp16 and for wmemcmp.

Change-Id: I33718441e7ee343cdb021d91dbeaf9ce2d4d7eb4
Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>

Conflicts:
	libc/arch-x86/string/ssse3-memcmp3-new.S
	libc/arch-x86/string/ssse3-wmemcmp-atom.S
	libc/arch-x86/x86.mk

Conflicts:
	libc/arch-x86/x86.mk
fix broken pointer overflow check ns_name_unpack()

Many compilers optimize away the overflow check `msg + l < msg',
where `msg' is a pointer and `l' is an integer, because pointer
overflow is undefined behavior in C.

Use a safe precondition test `l >= eol - msg' instead.

Change-Id: I3fca2125834073cc36d7e9c4e586e97842265a59
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Update kernel input headers

To upstream SHA e1c85813f3832b909d1c4309b213bb0a52c79ba5

Change-Id: I72ee3d59c105bc0252b5ca0c49c569d12ec685d1
Add more information to error due to truncated Elf32_Ehdr

Change-Id: I24f30bd0c1120bcf85d77f5c4e69f0fefe9a2478
don't hardcode register r0/v1 when reading the TLS

this leads to much improved code when calling __get_tls()

Change-Id: I21d870fb33c33a921ca55c4e100772e0f7a8d1e4

Conflicts:
	libc/private/bionic_tls.h
Change hard-coded temporary directory.

The properties tests creates a temporary directory in /data/nativetest,
but this directory might not exist in all circumstances.
Change this to create the temporary directory in /data/local/tmp.

Change-Id: I812d3e24fcd084c5d74055c9faa95b1656f255bc

Conflicts:
	tests/property_benchmark.cpp
	tests/system_properties_test.cpp

Conflicts:
	tests/system_properties_test.cpp
Fix abort(3) to raise SIGABRT rather than causing SIGSEGV.

tgkill() needs the .save stack unwinding directive to get the complete
stack trace.

BUG: https://code.google.com/p/android/issues/detail?id=16672

Change-Id: Ifb447dca2147a592c48baf32769dfc175d8aea72

Conflicts:
	libc/unistd/abort.c
Add the dl_iterate_phdr function to libdl for arm.

Bug: 8410085

Merge from internal master.

(cherry-picked from cb491bc66dc0abc145930b09086eb9189a30f6c2)

Change-Id: I94ed51bc5d4c626df7552c0e85c31ccee2d6568f
Add bionic-unit-tests-run-on-host special target

Allows running the tests linked with bionic .so on the host if host and
target are compatible. See more comments and usage limitation inlined.

make bionic-unit-tests-run-on-host should do build and run.

Change-Id: I5946fa72e009d324baa9da18f460294b3c1a615e
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>

Conflicts:
	tests/Android.mk

Conflicts:
	tests/Android.mk
Adjust includes in sincos() for their 4.3 paths

Change-Id: I225654a9d623720d7f1eda38d0dbb052e73b0227
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>

Conflicts:
	libm/sincos.c
Make cpp.py less braindead.

The old code ignored operator precedence (!), despite having two tables
of operator precedence. The code's still pretty awful, but I've cleaned
it up enough to fix this, the most important bug.

This patch lets us correctly clean the uapi unistd.h, stat.h, and swab.h files,
and also fixes the mess we were already making of various old kernel
header files. I've added a bunch more tests, fixed the existing tests that
the existing script was already failing (!), and changed the script so that
the tests are run every time the script is run.

We can probably remove some of the old kernel header files that we were
parsing incorrectly, but we can worry about that later.

Bug: 11253477
Change-Id: Ie66c65b3a7ae13b4e98ed8038a6a534f06eae0e5

Conflicts:
	libc/kernel/uapi/asm-generic/stat.h
	libc/kernel/uapi/asm-generic/swab.h
	libc/kernel/uapi/asm-generic/unistd.h
	libc/kernel/uapi/linux/v4l2-dv-timings.h
Add processed uapi kernel headers for ARM.

Change-Id: Id34de841b7b4b5a1bf7d22eb793860f92f24a6e5
Remove pathconf's dependencies on non-uapi header files.

Change-Id: I597996e4b141b009916f7ad2866dd100e08aa4d3
Remove the dependency on the non-uapi __kernel_nlink_t.

The kernel doesn't have an nlink_t; it just uses the equivalent of
uint32_t. We already had a usable __nlink_t in the C library, so
let's just define our nlink_t in terms of __nlink_t, which is what
__nlink_t was meant for anyway.

Note that our struct stat just follows the kernel, and doesn't refer
to nlink_t anyway.

Change-Id: I2a56e418e42404b1741b08c50554b03c11caebae
Add a temporary uapi/linux/compiler.h until upstream has one.

Bug: 11559337
Change-Id: I205974b1a26e4f85d0e11503afa80669195d211c
Add extra regression tests for an already-fixed dynamic linker bug.

Bug: https://code.google.com/p/android/issues/detail?id=61799
Change-Id: I84af68f8430a06e999297c2e57e06ecb45adf81e

Conflicts:
	tests/dlfcn_test.cpp