bionic: Change the type of soinfo's size to size_t

Some system functions like munmap expect soinfo's size to be size_t, but currently
it is unsigned. Change it to size_t to fit 64bit's portability.

Change-Id: I0bf6d522b38b0cd9bf1db05b004b5326217412a2
Signed-off-by: Weiwu Chen <weiwu.chen@intel.com>
Signed-off-by: Qiming Shi <qiming.shi@intel.com>

Conflicts:
	linker/linker.cpp
	linker/linker.h
Remove a __system_property_get call from the DNS code.

Change-Id: I48082ad9eb1b56349c6746ab2c371728c8571a81
Fix pthread_test to work with gtest 1.7.0.

Now we're building it correctly configured, gtest takes a couple of
TLS slots for itself.

Change-Id: I1c2c4e9e5f9c6e2e2e6ecd1214cfc16a5af5afed

Conflicts:
	tests/pthread_test.cpp
libc: krait: support KINGFISHER optimized memcpy

When defined use the KINGFISHER optimized
cortex-a9 memcpy instead to improve performance.

Change-Id: Idcfb94cc1e10d8326d7a9e623baed91125d7caf6
libm: sync with upstream freebsd

Summary:
New long double functions have been included,
but are not in use due to the android double long
handling. imprecise.c is not built for the same reason.

Test Plan: verified

Reviewers: randall.rushing

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

Change-Id: I77f2b6e202dd500ed38d62edf187a5ac10b3002c
Signed-off-by: DHOMD <DHO@dho.im>
libm: add fmal long double stub

Summary:
This is needed in some target cases, and has since been fixed internally in the AOSP.

From enh@google.com regarding this change:
you were right, and this was the way we should have done it, but i didn't work that out until i fixed this in the same way as part of the aarch64 work (where the weak reference didn't work).

Test Plan: verified

Reviewers: randall.rushing, jriordan001, synergy

Reviewed By: synergy

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

Change-Id: Ia57674b89e110a7fff4a90c534f67a6bbef57c68
Signed-off-by: DHOMD <DHO@dho.im>
Add arm <sys/ucontext.h>.

Change-Id: I14d435f9e3e82f77d8a7e886ff88c18f5d09d14a

Conflicts:
	libc/include/sys/ucontext.h
Make ARM <user.h> more glibc-compatible.

Change-Id: I681930ad7f80a5e7bc40eb0f36872e415445f0f9

Conflicts:
	libc/include/sys/user.h
libm: Squashed CAF sin/cos implementation for ARM NEON

Summary:
Bionic/libm: Add precision-correct de-serialize sin/cos.

Modify sin/cos to improve performance while retaining bit-for-bit
accuracy with existing algorithm.

Change-Id: Iaba2dd731cd015732744705dad8bddb713b43067
(cherry picked from commit df55e67573e176042c5d2ae084c758bc2e9e0025)
(cherry picked from commit 6a688d7aa4512731c430673ccd4f0d6e3999d439)
(cherry picked from commit 47bb7bc2962bff835000dca016f6319c20734398)

Bionic/libm: add assembly versions of sin/cos.

Add assembly versions of sin/cos with integrated remainder pi/2
calculation.  Directly extracted from binary libm.so compiled with
__ieee754_rem_pio2 calls inlined.

Change-Id: Ia093f420e58e794635e3a5f09e8236ae7601f1f6
(cherry picked from commit 19a356a1ed6384a9161739d5833cf5cfd88a8d3b)
(cherry picked from commit 1c9bdcfa6a68cd1a13a1e3b1a51616bddffeefad)
(cherry picked from commit cdaad8ab61325e958926b57a6a726d0cfa6f7511)

Bionic/libm: Remove extra vmov from sin/cos.

Move integer representations of x bits on the integer side rather
than moving them to and from the FP registers.

Change-Id: I1895db385c9616cdae9ab6403f392dfbae292adc
(cherry picked from commit 1d0c5a9fe67141515fa54403d985828590f9c206)
(cherry picked from commit ca46b68c30cf470464ffac530b8bdba242cc5c17)
(cherry picked from commit d7acb8827620ab7331995e843fd79015aed84996)

Test Plan: testing

Reviewers: jriordan001, randall.rushing, synergy

Reviewed By: synergy

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

Conflicts:
	libm/Android.mk
	libm/upstream-freebsd/lib/msun/src/e_pow.c
	libm/upstream-freebsd/lib/msun/src/k_cos.c
	libm/upstream-freebsd/lib/msun/src/math_private.h
libm:also use optimized sqrt/sqrtf on ARM NEON

Summary: Depends on D270 and stacks on top. Fixed from initial patch that was reverted

Test Plan: verified

Reviewers: randall.rushing, jriordan001

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

Conflicts:
	libm/arm/e_sqrt.S
	libm/arm/e_sqrtf.S
[ARM] libc: Improve how we set memcpy and memcmp flags

Summary: Check by cpu variant, and also that NEON_MEMCPY_ALIGNMENT_DIVIDER wasn't set elsewhere.

Test Plan: verified

Reviewers: randall.rushing, jriordan001

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

Conflicts:
	libc/Android.mk
libc: counting, rounding, and min/max macros

Summary:
These macros are the same as in gnu libc
and bsd's sys/sys/param.h

Test Plan: verified, and used in aosp internally now from glibc set for new linux-perf building.

Reviewers: randall.rushing, jriordan001, synergy

Reviewed By: synergy

Differential Revision: http://review.codefirex.com/D314
[ARM] libm: Implement ARM NEON optimized modf

Summary: Based on the math-neon implementation (which is based on the clibm implementation).

Test Plan: Performs slightly better than the generic freebsd implementation. Verified here.

Reviewers: randall.rushing, jriordan001

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