OSDN Git Service

android-x86/bionic.git
11 years agoMerge "stdlib: atexit: include <sys/cdefs.h>"
Elliott Hughes [Tue, 19 Feb 2013 21:58:18 +0000 (21:58 +0000)]
Merge "stdlib: atexit: include <sys/cdefs.h>"

11 years agoMerge "Fix pthreads functions that should return ESRCH."
Elliott Hughes [Tue, 19 Feb 2013 21:37:55 +0000 (21:37 +0000)]
Merge "Fix pthreads functions that should return ESRCH."

11 years agoFix pthreads functions that should return ESRCH.
Elliott Hughes [Sat, 16 Feb 2013 03:21:51 +0000 (19:21 -0800)]
Fix pthreads functions that should return ESRCH.

imgtec pointed out that pthread_kill(3) was broken, but most of the
other functions that ought to return ESRCH for invalid/exited threads
were equally broken.

Change-Id: I96347f6195549aee0c72dc39063e6c5d06d2e01f

11 years agoMerge "Update linker README."
Elliott Hughes [Tue, 19 Feb 2013 19:14:26 +0000 (19:14 +0000)]
Merge "Update linker README."

11 years agoUpdate linker README.
Elliott Hughes [Tue, 19 Feb 2013 19:13:44 +0000 (11:13 -0800)]
Update linker README.

Change-Id: Icaa353e9cf1848c86e7445f4ad590bdab44f7941

11 years agostdlib: atexit: include <sys/cdefs.h>
Chirayu Desai [Sat, 16 Feb 2013 15:53:27 +0000 (21:23 +0530)]
stdlib: atexit: include <sys/cdefs.h>

Change-Id: Ib9eb167710a021e0a2b5c77a06a9338cdc748e6d

11 years agoMerge "dalvik is big enough and ugly enough to handle System.arraycopy itself."
Elliott Hughes [Sat, 16 Feb 2013 00:40:21 +0000 (00:40 +0000)]
Merge "dalvik is big enough and ugly enough to handle System.arraycopy itself."

11 years agodalvik is big enough and ugly enough to handle System.arraycopy itself.
Elliott Hughes [Fri, 15 Feb 2013 22:27:52 +0000 (14:27 -0800)]
dalvik is big enough and ugly enough to handle System.arraycopy itself.

Change-Id: I4b54a15ea101c0c6bab06cfb11e4178f5a57fc05

11 years agoMerge "Fix the pthread_setname_np test."
Elliott Hughes [Fri, 15 Feb 2013 21:55:22 +0000 (21:55 +0000)]
Merge "Fix the pthread_setname_np test."

11 years agoFix the pthread_setname_np test.
Elliott Hughes [Fri, 15 Feb 2013 02:59:37 +0000 (18:59 -0800)]
Fix the pthread_setname_np test.

Fix the pthread_setname_np test to take into account that emulator kernels are
so old that they don't support setting the name of other threads.

The CLONE_DETACHED thread is obsolete since 2.5 kernels.

Rename kernel_id to tid.

Fix the signature of __pthread_clone.

Clean up the clone and pthread_setname_np implementations slightly.

Change-Id: I16c2ff8845b67530544bbda9aa6618058603066d

11 years agoMerge "Fix the stack protector death test."
Elliott Hughes [Fri, 15 Feb 2013 02:10:29 +0000 (02:10 +0000)]
Merge "Fix the stack protector death test."

11 years agoFix the stack protector death test.
Elliott Hughes [Fri, 15 Feb 2013 00:33:52 +0000 (16:33 -0800)]
Fix the stack protector death test.

Now __stack_chk_fail calls abort(3) directly, we terminate with
SIGSEGV rather than SIGABRT. (Because of the workaround for the
debuggerd lossage in the abort(3) implementation, which was the
motivation for switching __stack_chk_fail over to abort(3).)

Also clarify the comment on the weird pthread death test, so it
doesn't get copied and pasted onto real death tests.

Change-Id: Ie832eaded61359c99e7a10db65e28f35e8f63eed

11 years agoMerge "Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces."
Elliott Hughes [Thu, 14 Feb 2013 23:50:13 +0000 (23:50 +0000)]
Merge "Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces."

11 years agoMerge "bionic: Add securebits.h"
Nick Kralevich [Thu, 14 Feb 2013 22:49:28 +0000 (22:49 +0000)]
Merge "bionic: Add securebits.h"

11 years agoSimplify __stack_chk_fail, and fix it so we get debuggerd stack traces.
Elliott Hughes [Thu, 14 Feb 2013 22:37:34 +0000 (14:37 -0800)]
Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces.

Bug: 2487269
Change-Id: Iec5e470fc22cd9108404f634a9d4baa2c7b7f58f

11 years agobionic: Add securebits.h
Nick Kralevich [Thu, 14 Feb 2013 22:03:37 +0000 (14:03 -0800)]
bionic: Add securebits.h

Change-Id: I2031796b9be117558b80246498b29736492cf269

11 years agoMerge "Turn on -Werror for ssp.cpp."
Elliott Hughes [Thu, 14 Feb 2013 19:17:32 +0000 (19:17 +0000)]
Merge "Turn on -Werror for ssp.cpp."

11 years agoTurn on -Werror for ssp.cpp.
Elliott Hughes [Thu, 14 Feb 2013 19:15:58 +0000 (11:15 -0800)]
Turn on -Werror for ssp.cpp.

libc_bionic.a is already compiled -Werror, but this one file gets
compiled into its own library because it needs to be compiled with
-fno-stack-protector.

Change-Id: I273c535ab5c73ccaccbcf793fda1f788a2589abe

11 years agoMerge "fix compiler warning."
Nick Kralevich [Thu, 14 Feb 2013 17:48:30 +0000 (17:48 +0000)]
Merge "fix compiler warning."

11 years agofix compiler warning.
Nick Kralevich [Thu, 14 Feb 2013 17:44:13 +0000 (09:44 -0800)]
fix compiler warning.

bionic/libc/bionic/ssp.cpp:41:31: warning: converting to non-pointer type 'uintptr_t {aka unsigned int}' from NULL [-Wconversion-null]

Change-Id: Id154ed4a99520cca64ffd3dbe4d743db6e2da28a

11 years agoMerge "ffs was not being built for x86."
Elliott Hughes [Thu, 14 Feb 2013 00:49:46 +0000 (00:49 +0000)]
Merge "ffs was not being built for x86."

11 years agoMerge "Stop using the local gcc."
Elliott Hughes [Thu, 14 Feb 2013 00:48:53 +0000 (00:48 +0000)]
Merge "Stop using the local gcc."

11 years agoStop using the local gcc.
Elliott Hughes [Thu, 14 Feb 2013 00:32:47 +0000 (16:32 -0800)]
Stop using the local gcc.

Some build servers are still out of date, so we're better off having
the known quanitity of the consistently out-of-date prebuilt host gcc.

Change-Id: Ib6308ae926ffa1ac5d95efbbf32052344c17a6b8

11 years agoffs was not being built for x86.
Elliott Hughes [Thu, 14 Feb 2013 00:31:52 +0000 (16:31 -0800)]
ffs was not being built for x86.

Change-Id: I53e92273664a4d0a13536c2fa1aeb87e1f3cf4e8

11 years agoMerge "Add a bunch more missing ENDs to assembler routines."
Elliott Hughes [Wed, 13 Feb 2013 23:18:23 +0000 (23:18 +0000)]
Merge "Add a bunch more missing ENDs to assembler routines."

11 years agoAdd a bunch more missing ENDs to assembler routines.
Elliott Hughes [Wed, 13 Feb 2013 23:12:32 +0000 (15:12 -0800)]
Add a bunch more missing ENDs to assembler routines.

This isn't everything; I've missed out those x86 files that are

Change-Id: Idb7bb1a68796d6c0b70ea2b5c3300e49da6c62d2

11 years agoMerge "Everyone has CLZ."
Elliott Hughes [Wed, 13 Feb 2013 23:10:19 +0000 (23:10 +0000)]
Merge "Everyone has CLZ."

11 years agoEveryone has CLZ.
Elliott Hughes [Wed, 13 Feb 2013 22:35:14 +0000 (14:35 -0800)]
Everyone has CLZ.

Even armv5 had CLZ.

Change-Id: I51bc8d1166d09940fd0d3f4c7717edf26977082c

11 years agoMerge "Update getnameinfo.c, remove dead code, and fix error reporting."
Elliott Hughes [Wed, 13 Feb 2013 21:15:05 +0000 (21:15 +0000)]
Merge "Update getnameinfo.c, remove dead code, and fix error reporting."

11 years agoUpdate getnameinfo.c, remove dead code, and fix error reporting.
Elliott Hughes [Wed, 13 Feb 2013 17:49:33 +0000 (09:49 -0800)]
Update getnameinfo.c, remove dead code, and fix error reporting.

Also add a unit test for the salen size checking.

Bug: 1889275
Change-Id: I8ec4107df9e2e9a8571e8915525249c6e44b98ad

11 years agoMerge "Add a test that getaddrinfo works when hints are NULL."
Elliott Hughes [Wed, 13 Feb 2013 17:04:01 +0000 (17:04 +0000)]
Merge "Add a test that getaddrinfo works when hints are NULL."

11 years agoAdd a test that getaddrinfo works when hints are NULL.
Elliott Hughes [Wed, 13 Feb 2013 16:22:07 +0000 (08:22 -0800)]
Add a test that getaddrinfo works when hints are NULL.

Bug: 1827911
Change-Id: I9e1b774c44c10a8c5391bcf3baf1607f50eaf214

11 years agoMerge "Everyone has a TLS register."
Elliott Hughes [Wed, 13 Feb 2013 16:03:32 +0000 (16:03 +0000)]
Merge "Everyone has a TLS register."

11 years agoMerge "Fix __pthread_clone and __bionic_clone error handling on x86."
Elliott Hughes [Wed, 13 Feb 2013 16:02:10 +0000 (16:02 +0000)]
Merge "Fix __pthread_clone and __bionic_clone error handling on x86."

11 years agoFix __pthread_clone and __bionic_clone error handling on x86.
Elliott Hughes [Wed, 13 Feb 2013 07:02:33 +0000 (23:02 -0800)]
Fix __pthread_clone and __bionic_clone error handling on x86.

Bug: 3461078
Change-Id: I93c151e27411211dd32717f206745c62c08c21ee

11 years agoEveryone has a TLS register.
Elliott Hughes [Wed, 13 Feb 2013 05:56:42 +0000 (21:56 -0800)]
Everyone has a TLS register.

Change-Id: Id7cdf67087aa7d5074c9c59b7e595bc391d9f146

11 years agoMerge "Put the right number of Ls after 64-bit constants."
Elliott Hughes [Wed, 13 Feb 2013 04:20:43 +0000 (04:20 +0000)]
Merge "Put the right number of Ls after 64-bit constants."

11 years agoPut the right number of Ls after 64-bit constants.
Elliott Hughes [Wed, 13 Feb 2013 04:18:49 +0000 (20:18 -0800)]
Put the right number of Ls after 64-bit constants.

Change-Id: I9f96259f21e42a84b9ebe20655fe0edb31f41892

11 years agoMerge "Use ENTRY/END in custom x86 assembler too."
Elliott Hughes [Wed, 13 Feb 2013 04:01:01 +0000 (04:01 +0000)]
Merge "Use ENTRY/END in custom x86 assembler too."

11 years agoMerge "Clean up pthread_create."
Elliott Hughes [Wed, 13 Feb 2013 01:56:46 +0000 (01:56 +0000)]
Merge "Clean up pthread_create."

11 years agoMerge "Give up trying to build the pthread_setname_np tests for glibc."
Elliott Hughes [Wed, 13 Feb 2013 01:56:07 +0000 (01:56 +0000)]
Merge "Give up trying to build the pthread_setname_np tests for glibc."

11 years agoGive up trying to build the pthread_setname_np tests for glibc.
Elliott Hughes [Wed, 13 Feb 2013 01:20:42 +0000 (17:20 -0800)]
Give up trying to build the pthread_setname_np tests for glibc.

Looks like using /usr/bin/g++ isn't enough on some of our older
build servers.

Change-Id: Id7681fb164eb6324b10050f6bb237393e95b41e9

11 years agoClean up pthread_create.
Elliott Hughes [Wed, 13 Feb 2013 01:15:59 +0000 (17:15 -0800)]
Clean up pthread_create.

Bug: 3461078
Change-Id: I082122a86d7692cd58f4145539241be026258ee0

11 years agoMerge "Simplify pthread_create, using more public API."
Elliott Hughes [Wed, 13 Feb 2013 00:39:41 +0000 (00:39 +0000)]
Merge "Simplify pthread_create, using more public API."

11 years agoSimplify pthread_create, using more public API.
Elliott Hughes [Wed, 13 Feb 2013 00:36:04 +0000 (16:36 -0800)]
Simplify pthread_create, using more public API.

Change-Id: I08e65ba88ed01436223e4e528631c9e41ec0e7f4

11 years agoMerge "Really set errno if __pthread_clone fails."
Elliott Hughes [Wed, 13 Feb 2013 00:12:42 +0000 (00:12 +0000)]
Merge "Really set errno if __pthread_clone fails."

11 years agoReally set errno if __pthread_clone fails.
Elliott Hughes [Wed, 13 Feb 2013 00:07:06 +0000 (16:07 -0800)]
Really set errno if __pthread_clone fails.

If r0 == 0, we're the child. If r0 > 0, we're the parent.
Otherwise set errno.

The __bionic_clone code I copy & pasted was wrong. This patch
fixes both.

Bug: 3461078
Change-Id: Ibb7d6cc7e54e666841f2f0dc59a141a0b31982e4

11 years agoMerge "Revert "Revert "More pthreads cleanup."""
Elliott Hughes [Wed, 13 Feb 2013 00:05:24 +0000 (00:05 +0000)]
Merge "Revert "Revert "More pthreads cleanup."""

11 years agoRevert "Revert "More pthreads cleanup.""
Elliott Hughes [Tue, 12 Feb 2013 16:40:24 +0000 (16:40 +0000)]
Revert "Revert "More pthreads cleanup.""

This reverts commit 6f94de3ca49e4ea147b1c59e5818fa175846518f

(Doesn't try to increase the number of TLS slots; that leads to
an inability to boot. Adds more tests.)

Change-Id: Ia7d25ba3995219ed6e686463dbba80c95cc831ca

11 years agoMerge "add factory property file definition"
Dima Zavin [Tue, 12 Feb 2013 18:33:25 +0000 (18:33 +0000)]
Merge "add factory property file definition"

11 years agoam fcaf4e9f: Merge "Revert "More pthreads cleanup.""
Elliott Hughes [Tue, 12 Feb 2013 06:16:56 +0000 (22:16 -0800)]
am fcaf4e9f: Merge "Revert "More pthreads cleanup.""

# Via Gerrit Code Review
* commit 'fcaf4e9f9b735e053469c7ecbf63584e10fd67a7':
  Revert "More pthreads cleanup."

11 years agoMerge "Revert "More pthreads cleanup.""
Elliott Hughes [Tue, 12 Feb 2013 06:07:31 +0000 (06:07 +0000)]
Merge "Revert "More pthreads cleanup.""

11 years agoRevert "More pthreads cleanup."
Elliott Hughes [Tue, 12 Feb 2013 06:06:22 +0000 (06:06 +0000)]
Revert "More pthreads cleanup."

This reverts commit 2a1bb4e64677b9abbc17173c79768ed494565047

Change-Id: Ia443d0748015c8e9fc3121e40e68258616767b51

11 years agoam 85f491f9: Merge "More pthreads cleanup."
Elliott Hughes [Tue, 12 Feb 2013 02:35:56 +0000 (18:35 -0800)]
am 85f491f9: Merge "More pthreads cleanup."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '85f491f96da3b79d0d7cc5368bc1f649e1a82340':
  More pthreads cleanup.

11 years agoMerge "More pthreads cleanup."
Elliott Hughes [Tue, 12 Feb 2013 02:33:07 +0000 (02:33 +0000)]
Merge "More pthreads cleanup."

11 years agoam 83bf28e6: Merge "Fix MIPS build."
Elliott Hughes [Tue, 12 Feb 2013 02:19:34 +0000 (18:19 -0800)]
am 83bf28e6: Merge "Fix MIPS build."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '83bf28e6a38dbf28707147b50d29e81f4b555046':
  Fix MIPS build.

11 years agoMerge "Fix MIPS build."
Elliott Hughes [Tue, 12 Feb 2013 02:08:05 +0000 (02:08 +0000)]
Merge "Fix MIPS build."

11 years agoFix MIPS build.
Elliott Hughes [Tue, 12 Feb 2013 02:06:23 +0000 (18:06 -0800)]
Fix MIPS build.

Change-Id: I4863f21f3c2fd597ea36cb7096fc72db808643a3

11 years agoam c56be54a: Merge "Use ENTRY/END in ARM __get_sp."
Elliott Hughes [Tue, 12 Feb 2013 01:27:40 +0000 (17:27 -0800)]
am c56be54a: Merge "Use ENTRY/END in ARM __get_sp."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'c56be54a18eff7e1c35c9a19cfc8b84a80780b73':
  Use ENTRY/END in ARM __get_sp.

11 years agoUse ENTRY/END in custom x86 assembler too.
Elliott Hughes [Tue, 12 Feb 2013 01:08:16 +0000 (17:08 -0800)]
Use ENTRY/END in custom x86 assembler too.

Change-Id: Ic2e482e5daff29c65d3b2ab0b2111c996bbc6226

11 years agoMerge "Use ENTRY/END in ARM __get_sp."
Elliott Hughes [Tue, 12 Feb 2013 00:59:42 +0000 (00:59 +0000)]
Merge "Use ENTRY/END in ARM __get_sp."

11 years agoUse ENTRY/END in ARM __get_sp.
Elliott Hughes [Tue, 12 Feb 2013 00:58:34 +0000 (16:58 -0800)]
Use ENTRY/END in ARM __get_sp.

Change-Id: If2f159b266f5fa4ad9d188a17d4cd318b605e446

11 years agoam cae7b2cf: Merge "Fix __pthread_clone on ARM to set errno on failure."
Elliott Hughes [Tue, 12 Feb 2013 00:55:16 +0000 (16:55 -0800)]
am cae7b2cf: Merge "Fix __pthread_clone on ARM to set errno on failure."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'cae7b2cfb509e7d5d10a8085b1ec319daaef768f':
  Fix __pthread_clone on ARM to set errno on failure.

11 years agoMerge "Fix __pthread_clone on ARM to set errno on failure."
Elliott Hughes [Tue, 12 Feb 2013 00:49:28 +0000 (00:49 +0000)]
Merge "Fix __pthread_clone on ARM to set errno on failure."

11 years agoFix __pthread_clone on ARM to set errno on failure.
Elliott Hughes [Tue, 12 Feb 2013 00:36:48 +0000 (16:36 -0800)]
Fix __pthread_clone on ARM to set errno on failure.

MIPS and x86 appear to have been correct already.

(Also fix unit tests that ASSERT_EQ with errno so that the
arguments are in the retarded junit order.)

Bug: 3461078
Change-Id: I2418ea98927b56e15b4ba9cfec97f5e7094c6291

11 years agoam 1fea0f25: Merge "Clean up ARM assembler files to use ENTRY/END."
Elliott Hughes [Tue, 12 Feb 2013 00:17:48 +0000 (16:17 -0800)]
am 1fea0f25: Merge "Clean up ARM assembler files to use ENTRY/END."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '1fea0f258a45d918fe5ae8e9769f45c0348bd095':
  Clean up ARM assembler files to use ENTRY/END.

11 years agoMerge "Clean up ARM assembler files to use ENTRY/END."
Elliott Hughes [Tue, 12 Feb 2013 00:05:27 +0000 (00:05 +0000)]
Merge "Clean up ARM assembler files to use ENTRY/END."

11 years agoClean up ARM assembler files to use ENTRY/END.
Elliott Hughes [Mon, 11 Feb 2013 23:36:59 +0000 (15:36 -0800)]
Clean up ARM assembler files to use ENTRY/END.

We also don't need legacy syscall support (non-"swi 0").

Change-Id: Id1012e8ca18bf13f3f4e42200f39ba0e2e632cbf

11 years agoMore pthreads cleanup.
Elliott Hughes [Mon, 11 Feb 2013 20:34:03 +0000 (12:34 -0800)]
More pthreads cleanup.

POSIX says pthread_create returns EAGAIN, not ENOMEM.

Also pull pthread_attr_t functions into their own file.

Also pull pthread_setname_np into its own file.

Also remove unnecessary #includes from pthread_key.cpp.

Also account for those pthread keys used internally by bionic,
so they don't count against the number of keys available to user
code. (They do with glibc, but glibc's limit is the much more
generous 1024.)

Also factor out the common errno-restoring idiom to reduce gotos.

Bug: 6702535
Change-Id: I555e66efffcf2c1b5a2873569e91489156efca42

11 years agoam 2d3e7233: Merge "Revert "Revert "Pull the pthread_key_t functions out of pthread...
Elliott Hughes [Mon, 11 Feb 2013 20:38:30 +0000 (12:38 -0800)]
am 2d3e7233: Merge "Revert "Revert "Pull the pthread_key_t functions out of pthread.c."""

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '2d3e72336e76180fb00822386da4f14203d117ce':
  Revert "Revert "Pull the pthread_key_t functions out of pthread.c.""

11 years agoMerge "Revert "Revert "Pull the pthread_key_t functions out of pthread.c."""
Elliott Hughes [Mon, 11 Feb 2013 20:21:59 +0000 (20:21 +0000)]
Merge "Revert "Revert "Pull the pthread_key_t functions out of pthread.c."""

11 years agoam 8397cdba: Merge "Revert "Pull the pthread_key_t functions out of pthread.c.""
Elliott Hughes [Mon, 11 Feb 2013 20:21:50 +0000 (12:21 -0800)]
am 8397cdba: Merge "Revert "Pull the pthread_key_t functions out of pthread.c.""

# Via Gerrit Code Review
* commit '8397cdba9424febeaed4068829a5b0174ee1138c':
  Revert "Pull the pthread_key_t functions out of pthread.c."

11 years agoRevert "Revert "Pull the pthread_key_t functions out of pthread.c.""
Elliott Hughes [Mon, 11 Feb 2013 20:18:47 +0000 (20:18 +0000)]
Revert "Revert "Pull the pthread_key_t functions out of pthread.c.""

This reverts commit 6260553d48f6fd87ca220270bea8bafdde5726ec

(Removing the accidental libm/Android.mk change.)

Change-Id: I6cddd9857c31facc05636e8221505b3d2344cb75

11 years agoMerge "Revert "Pull the pthread_key_t functions out of pthread.c.""
Elliott Hughes [Mon, 11 Feb 2013 20:18:28 +0000 (20:18 +0000)]
Merge "Revert "Pull the pthread_key_t functions out of pthread.c.""

11 years agoRevert "Pull the pthread_key_t functions out of pthread.c."
Elliott Hughes [Mon, 11 Feb 2013 20:18:16 +0000 (20:18 +0000)]
Revert "Pull the pthread_key_t functions out of pthread.c."

This reverts commit ad59322ae432d11ff36dcf046016af8cfe45fbe4

somehow my unfinished libm/Android.mk change got into here.

Change-Id: I46be626c5269d60fb1ced9862f2ebaa380b4e0af

11 years agoam 09e89c3c: Merge "Pull the pthread_key_t functions out of pthread.c."
Elliott Hughes [Mon, 11 Feb 2013 20:05:45 +0000 (12:05 -0800)]
am 09e89c3c: Merge "Pull the pthread_key_t functions out of pthread.c."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '09e89c3ced51d846e13c2508fbb6812bb61475cd':
  Pull the pthread_key_t functions out of pthread.c.

11 years agoMerge "Pull the pthread_key_t functions out of pthread.c."
Elliott Hughes [Mon, 11 Feb 2013 20:02:29 +0000 (20:02 +0000)]
Merge "Pull the pthread_key_t functions out of pthread.c."

11 years agoPull the pthread_key_t functions out of pthread.c.
Elliott Hughes [Fri, 8 Feb 2013 23:46:37 +0000 (15:46 -0800)]
Pull the pthread_key_t functions out of pthread.c.

This was originally motivated by noticing that we were setting the
wrong bits for the well-known tls entries. That was a harmless bug
because none of the well-known tls entries has a destructor, but
it's best not to leave land mines lying around.

Also add some missing POSIX constants, a new test, and fix
pthread_key_create's return value when we hit the limit.

Change-Id: Ife26ea2f4b40865308e8410ec803b20bcc3e0ed1

11 years agoam 9a9bb243: Merge "Switch to using AT_RANDOM for the stack guards."
Elliott Hughes [Fri, 8 Feb 2013 19:22:05 +0000 (11:22 -0800)]
am 9a9bb243: Merge "Switch to using AT_RANDOM for the stack guards."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '9a9bb243b50be5e3910b8edad72327bc216e72d0':
  Switch to using AT_RANDOM for the stack guards.

11 years agoMerge "Switch to using AT_RANDOM for the stack guards."
Elliott Hughes [Fri, 8 Feb 2013 19:17:33 +0000 (19:17 +0000)]
Merge "Switch to using AT_RANDOM for the stack guards."

11 years agoSwitch to using AT_RANDOM for the stack guards.
Elliott Hughes [Fri, 8 Feb 2013 02:39:34 +0000 (18:39 -0800)]
Switch to using AT_RANDOM for the stack guards.

Bug: 7959813
Change-Id: I8db4b8912ba649bfe668c6f22aa44690ddd401a2

11 years agoam 03579da2: Merge "Add a few more missing libm long double stubs."
Elliott Hughes [Fri, 8 Feb 2013 02:15:06 +0000 (18:15 -0800)]
am 03579da2: Merge "Add a few more missing libm long double stubs."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '03579da2d91a57a0f22da14e4216ecaf811869f4':
  Add a few more missing libm long double stubs.

11 years agoMerge "Add a few more missing libm long double stubs."
Elliott Hughes [Fri, 8 Feb 2013 02:02:38 +0000 (02:02 +0000)]
Merge "Add a few more missing libm long double stubs."

11 years agoAdd a few more missing libm long double stubs.
Elliott Hughes [Fri, 8 Feb 2013 01:45:11 +0000 (17:45 -0800)]
Add a few more missing libm long double stubs.

Change-Id: I6c44b9f3eee730253a958d6cefdac99e6f79da3e

11 years agoam fa75fce5: Merge "update xattr.h"
Nick Kralevich [Fri, 8 Feb 2013 00:50:08 +0000 (16:50 -0800)]
am fa75fce5: Merge "update xattr.h"

# Via Gerrit Code Review (1) and Nick Kralevich (1)
* commit 'fa75fce56641255a571b8b472f010863c3095b70':
  update xattr.h

11 years agoMerge "update xattr.h"
Nick Kralevich [Fri, 8 Feb 2013 00:42:29 +0000 (00:42 +0000)]
Merge "update xattr.h"

11 years agoupdate xattr.h
Nick Kralevich [Fri, 8 Feb 2013 00:23:16 +0000 (16:23 -0800)]
update xattr.h

Change-Id: Ibd91167ba56e2692359b92fe3108da271f0c2e38

11 years agoam 964886af: Merge "Remove dead code from gensyscalls.py."
Elliott Hughes [Thu, 7 Feb 2013 22:57:41 +0000 (14:57 -0800)]
am 964886af: Merge "Remove dead code from gensyscalls.py."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '964886afa339959aedad1c09af738df4ffa4091d':
  Remove dead code from gensyscalls.py.

11 years agoMerge "Remove dead code from gensyscalls.py."
Elliott Hughes [Thu, 7 Feb 2013 22:17:55 +0000 (22:17 +0000)]
Merge "Remove dead code from gensyscalls.py."

11 years agoRemove dead code from gensyscalls.py.
Elliott Hughes [Thu, 7 Feb 2013 22:07:00 +0000 (14:07 -0800)]
Remove dead code from gensyscalls.py.

Change-Id: I0df69f8fd990f829ccbfcd5123c17b523d5a4d45

11 years agoam f6afd3b6: Merge "Fix x86 build, remove void* arithmetic."
Elliott Hughes [Thu, 7 Feb 2013 20:34:24 +0000 (12:34 -0800)]
am f6afd3b6: Merge "Fix x86 build, remove void* arithmetic."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'f6afd3b670e23f56bf341d12136416aee17ea249':
  Fix x86 build, remove void* arithmetic.

11 years agoam 59e9a496: Merge "__progname should be const char*, not char*."
Elliott Hughes [Thu, 7 Feb 2013 20:34:23 +0000 (12:34 -0800)]
am 59e9a496: Merge "__progname should be const char*, not char*."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '59e9a496b4341fd2b11d4a01544bf7edf3d00cc5':
  __progname should be const char*, not char*.

11 years agoMerge "Fix x86 build, remove void* arithmetic."
Elliott Hughes [Thu, 7 Feb 2013 20:27:40 +0000 (20:27 +0000)]
Merge "Fix x86 build, remove void* arithmetic."

11 years agoMerge "__progname should be const char*, not char*."
Elliott Hughes [Thu, 7 Feb 2013 20:16:32 +0000 (20:16 +0000)]
Merge "__progname should be const char*, not char*."

11 years agoFix x86 build, remove void* arithmetic.
Elliott Hughes [Thu, 7 Feb 2013 20:16:10 +0000 (12:16 -0800)]
Fix x86 build, remove void* arithmetic.

Change-Id: Idc7f14af2e094ac33de315e808176237af063bb8

11 years ago__progname should be const char*, not char*.
Elliott Hughes [Thu, 7 Feb 2013 20:06:44 +0000 (12:06 -0800)]
__progname should be const char*, not char*.

Change-Id: I8e846872c30a712fbc05c8da59ffa1cec1be31a4

11 years agoam 2f41531f: Merge "Clean up the argc/argv/envp/auxv handling."
Elliott Hughes [Thu, 7 Feb 2013 19:56:57 +0000 (11:56 -0800)]
am 2f41531f: Merge "Clean up the argc/argv/envp/auxv handling."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '2f41531ff9f48dbdaf2ba711e14c669031728e99':
  Clean up the argc/argv/envp/auxv handling.

11 years agoMerge "Clean up the argc/argv/envp/auxv handling."
Elliott Hughes [Thu, 7 Feb 2013 19:48:16 +0000 (19:48 +0000)]
Merge "Clean up the argc/argv/envp/auxv handling."

11 years agoClean up the argc/argv/envp/auxv handling.
Elliott Hughes [Thu, 7 Feb 2013 18:14:39 +0000 (10:14 -0800)]
Clean up the argc/argv/envp/auxv handling.

There's now only one place where we deal with this stuff, it only needs to
be parsed once by the dynamic linker (rather than by each recipient), and it's
now easier for us to get hold of auxv data early on.

Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5

11 years agoam d4187efd: Merge "Switch x86 syscall stubs over to the ENTER/END style of the ARM...
Elliott Hughes [Thu, 7 Feb 2013 17:12:18 +0000 (09:12 -0800)]
am d4187efd: Merge "Switch x86 syscall stubs over to the ENTER/END style of the ARM stubs."

# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'd4187efd7f9c30ffaff4738862e3d08be27a52e9':
  Switch x86 syscall stubs over to the ENTER/END style of the ARM stubs.