Remove <sys/_types.h>.

Bug: 12213562
Change-Id: I0d10664f9da60739bdbad0408be0dd61eea3c1fe
Make sure that the same tests are on all platforms.

In order to be able to generate a list of tests for cts, the same set of
tests must exist across all platforms. This CL adds empty tests where a
test was conditionally compiled out.

This CL creates a single library libBionicTests that includes all of
the tests found in bionic-unit-tests-static.

Also fix a few missing include files in some test files.

Tested by running and compiling the tests for every platform and
verifying the same number of tests are on each platform.

Change-Id: I9989d4bfebb0f9c409a0ce7e87169299eac605a2
Fix socklen_t (on LP64 only).

Too late to fix LP32 :-(

Bug: 12935461
Change-Id: Ib056ca1eaf9ae8712f88ae21ff94e91b08cf588b
Fix <link.h>.

Also move some of the stuff that should be in <link.h> out of the
private "linker.h", to make it clearer that these are public API
known to gdb that we can't change.

Bug: 12554197
Change-Id: I830e1260d3d8b833ed99bc1518f1c6b6102be8af
Switch <elf.h> over to linux uapi under the covers.

Remove the linker's reliance on BSD cruft and use the glibc-style
ElfW macro. (Other code too, but the linker contains the majority
of the code that needs to work for Elf32 and Elf64.)

All platforms need dl_iterate_phdr_static, so it doesn't make sense
to have that part of the per-architecture configuration.

Bug: 12476126
Change-Id: I1d7f918f1303a392794a6cd8b3512ff56bd6e487

Conflicts:

	libc/arch-mips64/mips64.mk

Signed-off-by: Marin Spajic <omgitzspajky@gmail.com>
Clean up cacheflush.

No cacheflush for LP64; use the GCC builtin instead. Clean up the
32-bit MIPS implementation now we no longer need to worry about
old versions of GCC.

Bug: 12924756
Change-Id: Ie23955b3ec194e226c4b2bce35b11d5e061f4753
Build syscall stubs in their own library.

This lets us lose the auto-generated makefiles.

Change-Id: I2de0c71b3b9c08f9cce8f4ff7fd7254dda008c86
Clean up all the lint cpplint can find in the dynamic linker.

Change-Id: Ic9ee7153817c22a252cc4b309283e355b623cab9

Conflicts:

	linker/linker.cpp

Signed-off-by: Marin Spajic <omgitzspajky@gmail.com>
Fix NSIG.

Our sigset_t definition hasn't been tied to our NSIG definition since we
switched to uapi headers, so we can now fix it without breaking the LP32 ABI.
The kernel uapi headers define and use _NSIG, so we need to have our scripts
rename the kernel's definitions out of the way, then we can define _NSIG
and NSIG in terms of the kernel's off-by-one value.

Bug: 12938442
Change-Id: Ic7c86fd5be5ad1d822f7b2b1d88c8a0d70a1ac0f
Remove unused variables not spotted by GCC.

Change-Id: I49a16096bc0f41f3ad0007249161e8bdfcf3438c

Conflicts:

	linker/linker.cpp

Signed-off-by: Marin Spajic <omgitzspajky@gmail.com>
Clean up sys_signame and sys_siglist a little.

We don't need quite so much duplication because we already have a way
to get the signal number from its name, and that already copes with the
fact that the mips/mips64 numbers are different from everyone else's.

Also remove sys_signame from LP64. glibc doesn't have this BSD-ism.

Change-Id: I6dc411a3d73589383c85d3b07d9d648311492a10

Conflicts:

	libc/Android.mk

Signed-off-by: Marin Spajic <omgitzspajky@gmail.com>