Commit Graph

2160 Commits

Author SHA1 Message Date
Elliott Hughes
69af6e61e1 Upgrade to tzdata2013a.
From the release notes:

    Chile's 2013 rules, and we guess rules for 2014 and later, will be
    the same as 2012, namely Apr Sun>=23 03:00 UTC to Sep Sun>=2 04:00 UTC.
    (Thanks to Steffen Thorsen and Robert Elz.)

    New Zones Asia/Khandyga, Asia/Ust-Nera, Europe/Busingen.
    (Thanks to Tobias Conradi and Arthur David Olson.)

Change-Id: I351e04b3348420ad7df7c648963c235b534033d2
2013-03-05 14:00:38 -08:00
Ben Cheng
133d97e4b0 Merge "Add stack unwinding directives to memcpy." 2013-03-05 21:04:38 +00:00
Elliott Hughes
eb93ebffba Switch to upstream-freebsd for the unmolested wchar code.
Change-Id: I87b4d76ff8da04109ae53638eec4f11629798960
2013-03-01 18:35:56 -08:00
Elliott Hughes
f0777843c0 Move realpath.c to upstream-freebsd.
This is actually a slightly newer upstream version than the one I
originally pulled. Hopefully now it's in upstream-freebsd it will
be easier to track upstream, though I still need to sit down and
write the necessary scripts at some point.

Bug: 5110679
Change-Id: I87e563f0f95aa8e68b45578e2a8f448bbf827a33
2013-03-01 17:11:39 -08:00
Ben Cheng
14283004f5 Add stack unwinding directives to memcpy.
Also include some Android specific header files.

Change-Id: Idbcbd43458ba945ca8c61bfbc04ea15fc0ae4e00
2013-03-01 14:56:04 -08:00
Ben Cheng
c5c6cb3f13 am 66273ac2: Merge "Adding strcmp tuned for Cortex-A15."
* commit '66273ac2b6b8c2042350204575bd290d96dea681':
  Adding strcmp tuned for Cortex-A15.
2013-03-01 10:24:58 -08:00
Ben Cheng
8f149da08d am b3b1ab62: Merge "Adding memcpy tuned for Cortex-A15."
* commit 'b3b1ab6213df15f99c9af3088cfe733428816fd3':
  Adding memcpy tuned for Cortex-A15.
2013-03-01 10:24:58 -08:00
Nick Kralevich
305a999589 am 8fa924e5: Merge "unistd.h: don\'t include sys/capability.h"
* commit '8fa924e5dff4588cca8586e0e727b9a544db7083':
  unistd.h: don't include sys/capability.h
2013-03-01 10:24:57 -08:00
Ben Cheng
66273ac2b6 Merge "Adding strcmp tuned for Cortex-A15." 2013-03-01 18:18:34 +00:00
Ben Cheng
b3b1ab6213 Merge "Adding memcpy tuned for Cortex-A15." 2013-03-01 18:18:05 +00:00
Nick Kralevich
6524d3cad7 unistd.h: don't include sys/capability.h
Don't pull in unnecessary header files. AFAIK, I've fixed all
the code which didn't include the correct header files.

Change-Id: If0b7bba74e77cb24a0cf9ce8968aa07400855e58
2013-03-01 10:10:55 -08:00
Greta Yorsh
eb149e954e Adding strcmp tuned for Cortex-A15.
The attached patch provides a new implementation of strcmp for ARM,
using LDRD instead of LDR whenever possible.

For older architectures that do not support LDRD, this implementation
uses the same algorithm as before.

Testing and benchmarking:
* Validation: successfully passes a test that compares different strings
of length 1-128 and offsets 0-8 from a word boundary. Checked on
qemu/A15/A9, ARM/Thumb mode, Big/Little Endian.
* Integration with gcc: no regression on qemu for arm-none-eabi --with-cpu
a15/a9 --with-mode arm/thumb.

Change-Id: I9e230e1b99dbdc9119b69ee858a89038c516a4ea
Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
2013-03-01 10:41:01 +00:00
Greta Yorsh
5b349fc22e Adding memcpy tuned for Cortex-A15.
The strategy for large block sizes is LDRD and STRD with offset addressing,
where the main loop copies 64 bytes in every iteration, (i.e., 8 calls to
LDRD and STRD pairs), interleaving load and stores (i.e., the pairs of LDRD
and STRD of the same data are consecutive instructions), and the writeback
of an updated address is a separate instruction, which allows us to write
back the accumulated update once per iteration.

This strategy is implemented in memcpy.S. In some configurations, a plain
version of memcpy (included from memcpy-stub.c) is used instead of the
optimized one.

Validation:
* Correctness: checked memcpy using a test harness for block sizes
ranging between 1 to 128, and source and destination buffers alignment
ranging in { 0,1,2,3,4,8,12 } bytes each.
* Performance: benchmarking on Cortex-A15 FPGA indicates that this strategy
is better for A15 than the strategy used by glibc and even slightly better
than using NEON. Benchmarking on Cortex-A9 bare metal and Linux shows
that the proposed strategy is reasonable: not as fast as the version of
memcpy from glibc (which is the best open source strategy for A9), but
comparable with csl and bionic.
* Integration with GCC: no regression for arm-none-eabi --with-cpu
cortex-a15 and cortex-a9.

Change-Id: Ied56354d8992c62ae3e02d582a2bd55585d814b9
Signed-off-by: Vassilis Laganakos <vasileios.laganakos@arm.com>
2013-03-01 10:40:50 +00:00
Elliott Hughes
7fe8229b49 am 9c1912c4: Merge "Avoid changing the C++ ABI with ssize_t."
* commit '9c1912c4bf5eb0edc07bfd333226c4e0b7a629eb':
  Avoid changing the C++ ABI with ssize_t.
2013-02-28 11:43:11 -08:00
Elliott Hughes
e255642dc1 Avoid changing the C++ ABI with ssize_t.
Bug: 8253769
Change-Id: Ia325003ed6e59da553e2bdde7c43515bc191b8ba
2013-02-28 10:51:31 -08:00
Nick Kralevich
58b997c812 am f5f906c1: Merge "libc: create sys/capability.h"
* commit 'f5f906c184677b8295523231cfeead9ed94661ad':
  libc: create sys/capability.h
2013-02-26 13:50:03 -08:00
Nick Kralevich
7c0dd555c0 libc: create sys/capability.h
Per "man capset", sys/capability.h is the appropriate header file
for the capget / capset definition, not unistd.h. Fixed.

As a short term hack, continue to include sys/capability.h in
unistd.h, until we can fix all the code which uses capget / capset.

Change-Id: I6e7cf55955d761ca785a14c5e4b7a44125d8fc15
2013-02-26 13:27:15 -08:00
Elliott Hughes
406968b244 am c0e9ddd0: Merge "Reimplement scandir(3)."
* commit 'c0e9ddd002f6084c29c26236d741d64d01713c15':
  Reimplement scandir(3).
2013-02-25 14:54:54 -08:00
Elliott Hughes
701bec2af3 Reimplement scandir(3).
The old scandir implementation didn't take into account the varying
size of directory entries, and didn't correctly clean up on its
error exits.

Bug: 7339844
Change-Id: Ib40e3564709752241a3119a496cbb2192e3f9abe
2013-02-25 13:14:31 -08:00
Elliott Hughes
7b8bf68133 am f6bb5bf4: Merge "Add the glibc-compatible names to <sys/endian.h>."
* commit 'f6bb5bf498810d0622f66020059c87b96738c35b':
  Add the glibc-compatible names to <sys/endian.h>.
2013-02-22 14:02:44 -08:00
Elliott Hughes
f6bb5bf498 Merge "Add the glibc-compatible names to <sys/endian.h>." 2013-02-22 21:46:59 +00:00
Elliott Hughes
440bc83d92 am 7b2c6385: Merge "Fix <memory.h> to be a synonym for <string.h> like in glibc."
* commit '7b2c6385effbb6d6e98bfe29cc6c144211128d9e':
  Fix <memory.h> to be a synonym for <string.h> like in glibc.
2013-02-22 12:10:15 -08:00
Nick Kralevich
cadc858329 am bc0e7ee1: Merge "libc: add sys/signal.h for compatibility"
* commit 'bc0e7ee18157c2ffe65644514555689f4259ccfe':
  libc: add sys/signal.h for compatibility
2013-02-22 11:53:05 -08:00
Elliott Hughes
7b2c6385ef Merge "Fix <memory.h> to be a synonym for <string.h> like in glibc." 2013-02-22 19:49:39 +00:00
Elliott Hughes
6f1b7a6407 Fix <memory.h> to be a synonym for <string.h> like in glibc.
Change-Id: If23589c5d85dffd28788e04b010303620fa178ca
2013-02-22 11:11:48 -08:00
Elliott Hughes
cf820d7e96 Add the glibc-compatible names to <sys/endian.h>.
Also remove declarations for functions that don't exist; these
are all macros.

Bug: http://code.google.com/p/android/issues/detail?id=41769
Change-Id: Ia3774ab2ff7d3c535f83774eac61068f9b11e194
2013-02-22 11:04:27 -08:00
Nick Kralevich
b22a684990 libc: add sys/signal.h for compatibility
Some applications look for sys/signal.h instead of signal.h.
Work around those apps.

Change-Id: I76ac7744ebc56d196b5f0cb9ed381d32817436b9
2013-02-22 10:38:28 -08:00
Elliott Hughes
2a5b57db8c am 580a7073: Merge "Stop advertising rindex(3), which is both deprecated and unimplemented."
* commit '580a707376d81bfcb39919f0a1203b39a39dbd8a':
  Stop advertising rindex(3), which is both deprecated and unimplemented.
2013-02-21 17:55:28 -08:00
Elliott Hughes
538f6fc202 Stop advertising rindex(3), which is both deprecated and unimplemented.
Change-Id: I3c775d9974e49c3f76a53e46e022659657b89034
2013-02-21 17:39:06 -08:00
Nick Kralevich
398f46dd92 am a0259b42: Merge "libc: remove bcmp prototype"
* commit 'a0259b42eba08e6d71a274fa3f770afccbb93107':
  libc: remove bcmp prototype
2013-02-21 17:39:03 -08:00
Nick Kralevich
a0259b42eb Merge "libc: remove bcmp prototype" 2013-02-22 01:22:35 +00:00
Nick Kralevich
11ebbc8437 libc: remove bcmp prototype
AFAIK, bionic only ever provided an implementation of bcmp
for x86, and even then, the code was never actually compiled.
Remove the prototype.

bcmp() has been obsoleted and replaced by memcmp()

Change-Id: I549d02ab6a9241a9acbbbfade0d98a9a02c2eaee
2013-02-21 17:17:09 -08:00
Elliott Hughes
719d46f8ac am a9ff09d1: Merge "Fix raise(3) so it works in signal handlers."
* commit 'a9ff09d1fc22292adc12cf99d4d44448d619b3cf':
  Fix raise(3) so it works in signal handlers.
2013-02-21 14:17:47 -08:00
Elliott Hughes
fae89fc404 Fix raise(3) so it works in signal handlers.
We could special-case raise(3) in non-threaded programs, but the more
conservative course is to make pthread_kill(3) work in signal handlers
at the cost of a race shared by other C libraries.

Change-Id: I59fb23d03bdabf403435e731704b33acdf3e0234
2013-02-21 11:22:23 -08:00
Jean-Baptiste Queru
818b1423d2 Fix mako builds. Do not merge.
Revert "Regenerate msm_ion.h."

This reverts commit 3fac8f7f49.
2013-02-20 12:47:58 -08:00
Thorsten Glaser
c641cafbc3 use architecture-specific ssize_t definition
after change 32822 was rejected, this is the more light-weight
version of the fix: libc/include/sys/types.h already - via
libc/kernel/common/linux/posix_types.h - includes a definition
of __kernel_ssize_t from libc/kernel/arch-*/asm/posix_types.h
which is architecture-specific, toolchain-agnostic and also
gets rid of the gcc -Wformat warning (which it issues correctly,
since this i̲s̲ indeed a bug in bionic)

Change-Id: Ie4503ab16628bc25815a836d07556f665e9795c7
2013-02-19 14:12:55 -08:00
Elliott Hughes
593abb7b59 Merge "stdlib: atexit: include <sys/cdefs.h>" 2013-02-19 21:58:18 +00:00
Elliott Hughes
9d23e04c43 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
2013-02-19 12:21:41 -08:00
Chirayu Desai
61ba9b526b stdlib: atexit: include <sys/cdefs.h>
Change-Id: Ib9eb167710a021e0a2b5c77a06a9338cdc748e6d
2013-02-16 21:23:27 +05:30
Elliott Hughes
081318e355 dalvik is big enough and ugly enough to handle System.arraycopy itself.
Change-Id: I4b54a15ea101c0c6bab06cfb11e4178f5a57fc05
2013-02-15 14:27:52 -08:00
Elliott Hughes
40eabe24e4 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
2013-02-15 12:08:59 -08:00
Elliott Hughes
0a2cb81597 Merge "Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces." 2013-02-14 23:50:13 +00:00
Elliott Hughes
fb7eb5e07f Simplify __stack_chk_fail, and fix it so we get debuggerd stack traces.
Bug: 2487269
Change-Id: Iec5e470fc22cd9108404f634a9d4baa2c7b7f58f
2013-02-14 14:37:34 -08:00
Nick Kralevich
0276656daa bionic: Add securebits.h
Change-Id: I2031796b9be117558b80246498b29736492cf269
2013-02-14 14:03:37 -08:00
Elliott Hughes
dc5ec07158 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
2013-02-14 11:15:58 -08:00
Nick Kralevich
a261afb7c9 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
2013-02-14 09:44:13 -08:00
Elliott Hughes
d2547040a1 ffs was not being built for x86.
Change-Id: I53e92273664a4d0a13536c2fa1aeb87e1f3cf4e8
2013-02-13 16:31:52 -08:00
Elliott Hughes
6719500dbd 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
2013-02-13 15:12:32 -08:00
Elliott Hughes
73964c592c Everyone has CLZ.
Even armv5 had CLZ.

Change-Id: I51bc8d1166d09940fd0d3f4c7717edf26977082c
2013-02-13 14:40:48 -08:00
Elliott Hughes
d8213bb573 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
2013-02-13 13:11:11 -08:00
Elliott Hughes
3002d64bcd Merge "Everyone has a TLS register." 2013-02-13 16:03:32 +00:00
Elliott Hughes
b6032515a0 Fix __pthread_clone and __bionic_clone error handling on x86.
Bug: 3461078
Change-Id: I93c151e27411211dd32717f206745c62c08c21ee
2013-02-12 23:02:33 -08:00
Elliott Hughes
91a9925998 Everyone has a TLS register.
Change-Id: Id7cdf67087aa7d5074c9c59b7e595bc391d9f146
2013-02-12 21:56:42 -08:00
Elliott Hughes
59aeff9417 Merge "Use ENTRY/END in custom x86 assembler too." 2013-02-13 04:01:01 +00:00
Elliott Hughes
4b4a882428 Clean up pthread_create.
Bug: 3461078
Change-Id: I082122a86d7692cd58f4145539241be026258ee0
2013-02-12 17:15:59 -08:00
Elliott Hughes
6d33918207 Simplify pthread_create, using more public API.
Change-Id: I08e65ba88ed01436223e4e528631c9e41ec0e7f4
2013-02-12 16:36:04 -08:00
Elliott Hughes
9f878c2fca 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
2013-02-12 16:07:06 -08:00
Elliott Hughes
558a8b1d3b Merge "Revert "Revert "More pthreads cleanup.""" 2013-02-13 00:05:24 +00:00
Elliott Hughes
3e898476c7 Revert "Revert "More pthreads cleanup.""
This reverts commit 6f94de3ca4

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

Change-Id: Ia7d25ba3995219ed6e686463dbba80c95cc831ca
2013-02-12 15:27:18 -08:00
Dima Zavin
3fa6746536 Merge "add factory property file definition" 2013-02-12 18:33:26 +00:00
Elliott Hughes
bfa199ab40 am fcaf4e9f: Merge "Revert "More pthreads cleanup.""
# Via Gerrit Code Review
* commit 'fcaf4e9f9b735e053469c7ecbf63584e10fd67a7':
  Revert "More pthreads cleanup."
2013-02-11 22:16:56 -08:00
Elliott Hughes
fcaf4e9f9b Merge "Revert "More pthreads cleanup."" 2013-02-12 06:07:32 +00:00
Elliott Hughes
6f94de3ca4 Revert "More pthreads cleanup."
This reverts commit 2a1bb4e646

Change-Id: Ia443d0748015c8e9fc3121e40e68258616767b51
2013-02-12 06:06:22 +00:00
Elliott Hughes
a2a9817f4c am 85f491f9: Merge "More pthreads cleanup."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '85f491f96da3b79d0d7cc5368bc1f649e1a82340':
  More pthreads cleanup.
2013-02-11 18:35:56 -08:00
Elliott Hughes
85f491f96d Merge "More pthreads cleanup." 2013-02-12 02:33:08 +00:00
Elliott Hughes
605cc29358 am 83bf28e6: Merge "Fix MIPS build."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '83bf28e6a38dbf28707147b50d29e81f4b555046':
  Fix MIPS build.
2013-02-11 18:19:34 -08:00
Elliott Hughes
83bf28e6a3 Merge "Fix MIPS build." 2013-02-12 02:08:05 +00:00
Elliott Hughes
ba342c11ad Fix MIPS build.
Change-Id: I4863f21f3c2fd597ea36cb7096fc72db808643a3
2013-02-11 18:06:23 -08:00
Elliott Hughes
8e2b28cb6c 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.
2013-02-11 17:27:40 -08:00
Elliott Hughes
bdff26df27 Use ENTRY/END in custom x86 assembler too.
Change-Id: Ic2e482e5daff29c65d3b2ab0b2111c996bbc6226
2013-02-11 17:08:16 -08:00
Elliott Hughes
d7a3a403c1 Use ENTRY/END in ARM __get_sp.
Change-Id: If2f159b266f5fa4ad9d188a17d4cd318b605e446
2013-02-11 16:58:34 -08:00
Elliott Hughes
c440d24423 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.
2013-02-11 16:55:16 -08:00
Elliott Hughes
5e3fc43dde 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
2013-02-11 16:39:10 -08:00
Elliott Hughes
03798dd23c 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.
2013-02-11 16:17:48 -08:00
Elliott Hughes
f94fd3ccc6 Clean up ARM assembler files to use ENTRY/END.
We also don't need legacy syscall support (non-"swi 0").

Change-Id: Id1012e8ca18bf13f3f4e42200f39ba0e2e632cbf
2013-02-11 15:36:59 -08:00
Elliott Hughes
2a1bb4e646 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
2013-02-11 14:56:39 -08:00
Elliott Hughes
6b73d13fa4 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.""
2013-02-11 12:38:30 -08:00
Elliott Hughes
e4b08318c1 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."
2013-02-11 12:21:50 -08:00
Elliott Hughes
44b53ad681 Revert "Revert "Pull the pthread_key_t functions out of pthread.c.""
This reverts commit 6260553d48

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

Change-Id: I6cddd9857c31facc05636e8221505b3d2344cb75
2013-02-11 12:20:33 -08:00
Elliott Hughes
6260553d48 Revert "Pull the pthread_key_t functions out of pthread.c."
This reverts commit ad59322ae4

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

Change-Id: I46be626c5269d60fb1ced9862f2ebaa380b4e0af
2013-02-11 20:18:16 +00:00
Elliott Hughes
024246ec27 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.
2013-02-11 12:05:45 -08:00
Elliott Hughes
ad59322ae4 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
2013-02-11 12:00:48 -08:00
Elliott Hughes
8f509e8be1 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.
2013-02-08 11:22:05 -08:00
Elliott Hughes
9a9bb243b5 Merge "Switch to using AT_RANDOM for the stack guards." 2013-02-08 19:17:33 +00:00
Elliott Hughes
d3920b3a99 Switch to using AT_RANDOM for the stack guards.
Bug: 7959813
Change-Id: I8db4b8912ba649bfe668c6f22aa44690ddd401a2
2013-02-08 11:16:13 -08:00
Nick Kralevich
f156b901b1 am fa75fce5: Merge "update xattr.h"
# Via Gerrit Code Review (1) and Nick Kralevich (1)
* commit 'fa75fce56641255a571b8b472f010863c3095b70':
  update xattr.h
2013-02-07 16:50:08 -08:00
Nick Kralevich
b184d3ba33 update xattr.h
Change-Id: Ibd91167ba56e2692359b92fe3108da271f0c2e38
2013-02-07 16:23:16 -08:00
Elliott Hughes
86e4e23408 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.
2013-02-07 14:57:41 -08:00
Elliott Hughes
cd6780b167 Remove dead code from gensyscalls.py.
Change-Id: I0df69f8fd990f829ccbfcd5123c17b523d5a4d45
2013-02-07 14:07:00 -08:00
Elliott Hughes
5bb67760f0 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.
2013-02-07 12:34:24 -08:00
Elliott Hughes
8ddef40dad 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*.
2013-02-07 12:34:23 -08:00
Elliott Hughes
f6afd3b670 Merge "Fix x86 build, remove void* arithmetic." 2013-02-07 20:27:40 +00:00
Elliott Hughes
646e058136 Fix x86 build, remove void* arithmetic.
Change-Id: Idc7f14af2e094ac33de315e808176237af063bb8
2013-02-07 12:16:10 -08:00
Elliott Hughes
e4ccf5a138 __progname should be const char*, not char*.
Change-Id: I8e846872c30a712fbc05c8da59ffa1cec1be31a4
2013-02-07 12:06:44 -08:00
Elliott Hughes
6f67cd224e 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.
2013-02-07 11:56:57 -08:00
Elliott Hughes
2f41531ff9 Merge "Clean up the argc/argv/envp/auxv handling." 2013-02-07 19:48:17 +00:00
Elliott Hughes
42b2c6a5ee 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
2013-02-07 11:44:21 -08:00
Elliott Hughes
4e9d9e4df8 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.
2013-02-07 09:12:18 -08:00
Elliott Hughes
7582a9c119 Switch x86 syscall stubs over to the ENTER/END style of the ARM stubs.
Also update the x86 asm.h to support this; we need it for libm assembler
anyway.

Also clean up the _FBSDID hack in <sys/cdefs.h>.

Change-Id: Iababd977b8110ec022bf7c93f4d62ece47630e7c
2013-02-06 17:08:15 -08:00
Elliott Hughes
df8c72e510 am d7ff139f: Merge "Remove bogus extra alignment from sbrk."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'd7ff139fec5cec08793523aa97503ade2b13c38e':
  Remove bogus extra alignment from sbrk.
2013-02-05 17:09:55 -08:00
Elliott Hughes
428f5567be Remove bogus extra alignment from sbrk.
Bug: https://code.google.com/p/android/issues/detail?id=37349
Change-Id: I970c7b6be7bb7fbe6bbbe2c332f05816aeb0e09f
2013-02-05 16:10:59 -08:00
Elliott Hughes
3cbcb87bd1 am a4f88fdc: Merge "Document the mallinfo struct, add missing attributes."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a4f88fdcf0e9be084d04048ad65671716298c3c2':
  Document the mallinfo struct, add missing attributes.
2013-02-04 13:59:15 -08:00
Elliott Hughes
24fad01755 Document the mallinfo struct, add missing attributes.
Change-Id: Ia97acce1f6a83bd8b3ba8dd20efd962bc96f35a9
2013-02-04 13:44:14 -08:00
Elliott Hughes
ada6de673b am a1821f01: Merge "Regenerate msm_ion.h."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a1821f015306e221e6a51e5acc27176ae2d72f6b':
  Regenerate msm_ion.h.
2013-02-04 10:52:16 -08:00
Elliott Hughes
3fac8f7f49 Regenerate msm_ion.h.
Bug: 8000377
Change-Id: If496d9972cb8aebfc996ac641aa762220aa71f3b
2013-02-01 18:21:08 -08:00
Elliott Hughes
16444e0f85 am 3dc6b57c: Merge "Don\'t claim there were no leaks if we weren\'t even checking."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '3dc6b57cf54b15a756551deeda33df5715e519bb':
  Don't claim there were no leaks if we weren't even checking.
2013-02-01 17:26:56 -08:00
Elliott Hughes
9c81892c2e Don't claim there were no leaks if we weren't even checking.
Bug: 8107016
Change-Id: I9059f1f8374ebcdf00dfc6ac74d3709f501292c9
2013-02-01 17:07:40 -08:00
Elliott Hughes
704d9c5b45 am a9dd3670: Merge "Restore bionic\'s <linux/elf-em.h>."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a9dd36702f4a9d65d084387050b688b8965b13b3':
  Restore bionic's <linux/elf-em.h>.
2013-02-01 16:19:37 -08:00
Elliott Hughes
a48e1b2aac Restore bionic's <linux/elf-em.h>.
Used by <linux/audit.h>.

Change-Id: Ica4ebb7f52a7fce13c52fdff35e187ded3939382
2013-02-01 16:10:28 -08:00
Elliott Hughes
ff26e25b51 am 44badc70: Merge "Upgrade libm."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '44badc70ccd35d7690bda9f107e3e5da0b80d295':
  Upgrade libm.
2013-02-01 15:24:27 -08:00
Elliott Hughes
44badc70cc Merge "Upgrade libm." 2013-02-01 23:07:49 +00:00
Elliott Hughes
a0ee07829a Upgrade libm.
This brings us up to date with FreeBSD HEAD, fixes various bugs, unifies
the set of functions we support on ARM, MIPS, and x86, fixes "long double",
adds ISO C99 support, and adds basic unit tests.

It turns out that our "long double" functions have always been broken
for non-normal numbers. This patch fixes that by not using the upstream
implementations and just forwarding to the regular "double" implementation
instead (since "long double" on Android is just "double" anyway, which is
what BSD doesn't support).

All the tests pass on ARM, MIPS, and x86, plus glibc on x86-64.

Bug: 3169850
Bug: 8012787
Bug: https://code.google.com/p/android/issues/detail?id=6697
Change-Id: If0c343030959c24bfc50d4d21c9530052c581837
2013-02-01 14:51:19 -08:00
Elliott Hughes
9743d7fb60 am fb55511e: am e1a124e5: Merge "Say explicitly if there were no leaks."
# Via Android Git Automerger (1) and others
* commit 'fb55511e71900476fd03f9c490dc60269d076d1f':
  Say explicitly if there were no leaks.
2013-01-30 12:11:30 -08:00
Elliott Hughes
fb55511e71 am e1a124e5: Merge "Say explicitly if there were no leaks."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'e1a124e5c93b59e2b6792e4de8a2c72dc0a78be1':
  Say explicitly if there were no leaks.
2013-01-30 12:09:14 -08:00
Elliott Hughes
1d12d57416 Say explicitly if there were no leaks.
Otherwise people trying to use this are left wondering "did I not leak, or did
the leak checking code not get called when I exited?".

Change-Id: If79b225f8a2e24dd69aba1fb836bf9e81bb00efe
2013-01-30 11:38:26 -08:00
Elliott Hughes
9d43c07987 am 4e882503: am a990cf5b: Merge "Clean up trailing whitespace in the kernel headers."
# Via Android Git Automerger (1) and others
* commit '4e8825038e08762dcc973fa435b531f10290ffa8':
  Clean up trailing whitespace in the kernel headers.
2013-01-30 10:31:24 -08:00
Elliott Hughes
4e8825038e am a990cf5b: Merge "Clean up trailing whitespace in the kernel headers."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a990cf5b3392c5aef767aee1e67b4d7ef651afc6':
  Clean up trailing whitespace in the kernel headers.
2013-01-30 10:28:59 -08:00
Elliott Hughes
a990cf5b33 Merge "Clean up trailing whitespace in the kernel headers." 2013-01-30 18:13:29 +00:00
Elliott Hughes
c95eb57405 Clean up trailing whitespace in the kernel headers.
And fix the scripts so they stop letting trailing whitespace through.

Change-Id: Ie109fbe1f63321e565ba0fa60fee8e9cf3a61cfc
2013-01-30 10:13:07 -08:00
Elliott Hughes
5821e11d0b am 7bc49fcf: am 323287ea: Merge "Fix valgrind build."
# Via Android Git Automerger (1) and others
* commit '7bc49fcfc0de8ce6f386f362cdab6902e6bbe7b4':
  Fix valgrind build.
2013-01-29 18:09:26 -08:00
Elliott Hughes
7bc49fcfc0 am 323287ea: Merge "Fix valgrind build."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '323287ea7fb1d22f64b49d701b33cef9fbaf757d':
  Fix valgrind build.
2013-01-29 18:06:19 -08:00
Elliott Hughes
6fe67c3cf2 Fix valgrind build.
Change-Id: Ie375d32565d10f4c0c56da5422f52b68cb069654
2013-01-29 17:49:12 -08:00
Elliott Hughes
9d995d6721 am 1cc09402: am f6721978: Merge "Fix x86 build to use <elf.h>."
# Via Android Git Automerger (1) and others
* commit '1cc09402e86b91213e06a9a349c5c510cefcf1d5':
  Fix x86 build to use <elf.h>.
2013-01-29 17:04:14 -08:00
Elliott Hughes
0a383883fa am be11de2b: am 5fb409b7: Merge "Bring the NOTICE files back up to date."
# Via Android Git Automerger (1) and others
* commit 'be11de2b52ac5f8cbb5a733821cb27002f2ea975':
  Bring the NOTICE files back up to date.
2013-01-29 17:04:13 -08:00
Elliott Hughes
a7f44b5afe am 172e038f: am f09f6db5: Merge "Use the NetBSD <sys/exec_elf.h>."
# Via Android Git Automerger (1) and others
* commit '172e038f9e5b711a77afe7e8899343215cf25c9e':
  Use the NetBSD <sys/exec_elf.h>.
2013-01-29 17:04:11 -08:00
Elliott Hughes
1cc09402e8 am f6721978: Merge "Fix x86 build to use <elf.h>."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'f67219783fa7c38c1f4f077364290d10d3aa1db4':
  Fix x86 build to use <elf.h>.
2013-01-29 16:58:45 -08:00
Elliott Hughes
be11de2b52 am 5fb409b7: Merge "Bring the NOTICE files back up to date."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '5fb409b7b0b0a4ecca5fd2a6c7dc5ce421f6b7cf':
  Bring the NOTICE files back up to date.
2013-01-29 16:42:04 -08:00
Elliott Hughes
d070df4c74 Fix x86 build to use <elf.h>.
Change-Id: I7b697d5eae69dc08eb31471a42cb8bbe5360be76
2013-01-29 16:40:39 -08:00
Elliott Hughes
172e038f9e am f09f6db5: Merge "Use the NetBSD <sys/exec_elf.h>."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'f09f6db5dd87856bbbb7a3d465187b9d8799a788':
  Use the NetBSD <sys/exec_elf.h>.
2013-01-29 16:26:10 -08:00
Elliott Hughes
448080d372 Bring the NOTICE files back up to date.
Change-Id: I978275cf6604b90595ee79d897c0460eeadc7dc8
2013-01-29 16:25:06 -08:00
Elliott Hughes
a6a3ac5924 Use the NetBSD <sys/exec_elf.h>.
Replace a kernel header file dependency with files from NetBSD.
They're more complete, and ELF is ELF, whether you're on Linux or a BSD.

Bug: 7973611
Change-Id: I83ee719e7efdf432ec2ddbe8be271d05b2f558d7
2013-01-29 15:02:50 -08:00
Elliott Hughes
f5d6238c4b am 3f20ecc2: am 3db2fc5a: Merge "Don\'t collect useless stack frames; do demangle C++ symbols."
# Via Android Git Automerger (1) and others
* commit '3f20ecc20486ae8fe8d9332102b503135f83c62d':
  Don't collect useless stack frames; do demangle C++ symbols.
2013-01-29 12:07:13 -08:00
Elliott Hughes
3f20ecc204 am 3db2fc5a: Merge "Don\'t collect useless stack frames; do demangle C++ symbols."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '3db2fc5acb4894a2cb22533b165a0de1bbafc3f6':
  Don't collect useless stack frames; do demangle C++ symbols.
2013-01-29 12:03:53 -08:00
Elliott Hughes
35b621c5f4 Don't collect useless stack frames; do demangle C++ symbols.
Previously, we'd collect every stack frame and then throw some away
when we came to log them. This meant that stack traces were effectively
shorter than the buffers that had been allocated for them. This patch
only stores frames we'll actually output.

Also dynamically call the C++ demangler so we don't have to try to
read mangled names. Because no one knows the mangling of operator new[]
for int arrays off the top of their head.

Bug: 7291287
Change-Id: I42b022fd7cd61675d05171de4c3b2704d058ef2a
2013-01-29 09:56:31 -08:00
Elliott Hughes
2218b89ca7 am d383ac15: am a0151cbf: Merge "Unit tests for formatting code, fix %%."
# Via Android Git Automerger (1) and others
* commit 'd383ac1570b553d68ed399c74b73bad1498d78f6':
  Unit tests for formatting code, fix %%.
2013-01-28 14:11:54 -08:00
Elliott Hughes
d383ac1570 am a0151cbf: Merge "Unit tests for formatting code, fix %%."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit 'a0151cbfbaa37965dbcd188a55a78d3ad4802b9b':
  Unit tests for formatting code, fix %%.
2013-01-28 14:10:08 -08:00
Elliott Hughes
41b3179c9e Unit tests for formatting code, fix %%.
Also fix <signal.h> and <stdio.h> so they don't cause compiler warnings.

Change-Id: Ib1a746bf01de22d47dbd964de0e6af80a7c96303
2013-01-28 10:36:31 -08:00
Elliott Hughes
d265d36749 am f07db754: am 0a91b11d: Merge "More debug malloc fixes."
# Via Android Git Automerger (1) and others
* commit 'f07db75443cce4ab96c93bdaa0793d7b8e87547e':
  More debug malloc fixes.
2013-01-25 18:09:45 -08:00
Elliott Hughes
f07db75443 am 0a91b11d: Merge "More debug malloc fixes."
# Via Elliott Hughes (1) and Gerrit Code Review (1)
* commit '0a91b11d286446fe7849a6f537b4a21a52f63399':
  More debug malloc fixes.
2013-01-25 18:07:23 -08:00
Elliott Hughes
239e7a0756 More debug malloc fixes.
Include the leaky executable's name in the log output. Fix the "sh" test.
Use uintptr_t instead of intptr_t.

Also fix debug formatting of NULL with %s.

Bug: 7291287
Change-Id: I015bf341cd48d43a247173612e6ccb1bf1243d53
2013-01-25 17:13:45 -08:00
Elliott Hughes
88af723267 am 7ae99845: am 6a94cb74: Merge "arm syscall : for eabi call_default don\'t use stack"
# By Matthieu Castet
# Via Android Git Automerger (1) and others
* commit '7ae998456c2564aff4ecbe6a6df214821f6e26cc':
  arm syscall : for eabi call_default don't use stack
2013-01-25 14:10:02 -08:00
Nick Kralevich
2ebcd19cbc am 27818d2a: am b871e5d6: Merge "system_properties: do more checking of file"
# Via Android Git Automerger (1) and others
* commit '27818d2a16e4972acba15368f55a59cc0ed990f0':
  system_properties: do more checking of file
2013-01-25 14:10:01 -08:00
Elliott Hughes
7ae998456c am 6a94cb74: Merge "arm syscall : for eabi call_default don\'t use stack"
# By Matthieu Castet
# Via Gerrit Code Review (1) and Matthieu Castet (1)
* commit '6a94cb748bf63278c3271b0ab610061b0dc6f04a':
  arm syscall : for eabi call_default don't use stack
2013-01-25 14:08:26 -08:00
Nick Kralevich
27818d2a16 am b871e5d6: Merge "system_properties: do more checking of file"
# Via Gerrit Code Review (1) and Nick Kralevich (1)
* commit 'b871e5d6b3b4a214c7f19bdfca7663f1fe49fda8':
  system_properties: do more checking of file
2013-01-25 14:08:26 -08:00
Elliott Hughes
6a94cb748b Merge "arm syscall : for eabi call_default don't use stack" 2013-01-25 21:57:58 +00:00
Nick Kralevich
c16961b8c3 system_properties: do more checking of file
Check that the permissions on the properties file
are exactly as we expect them to be.

Make sure we close the fd if fstat fails.

Refactor the code slightly.

Change-Id: I5503fd58c3b8093ce7e6d05920748ed70eaf8e2c
2013-01-25 13:07:31 -08:00
Nick Kralevich
151e91e66c am da2d2c61: am 82ef8296: Merge "prctl.h: include sys/cdefs.h"
# Via Android Git Automerger (1) and others
* commit 'da2d2c618c23f212f8dec0c0615bf75d7c18b88d':
  prctl.h: include sys/cdefs.h
2013-01-24 16:11:56 -08:00
Nick Kralevich
da2d2c618c am 82ef8296: Merge "prctl.h: include sys/cdefs.h"
# Via Gerrit Code Review (1) and Nick Kralevich (1)
* commit '82ef8296dc5e25b9cc8e7231f9515f50185dac9d':
  prctl.h: include sys/cdefs.h
2013-01-24 08:59:00 -08:00
Nick Kralevich
8e70b0d5c3 prctl.h: include sys/cdefs.h
prctl.h uses __BEGIN_DECLS but fails to include sys/cdefs.h
(where it's defined).  Code which includes prctl.h without
previously including sys/cdefs.h will fail to compile.

Fixed.

Change-Id: If4c9f3308f08b93596dcd00e351ae786807e9320
2013-01-23 16:49:47 -08:00
Nick Kralevich
b8726037ee am e7d937b5: am b3351f12: Merge "libc: use more secure system properties if available"
* commit 'e7d937b52f183ce84751701c369ffe6a4c81d033':
  libc: use more secure system properties if available
2013-01-23 11:09:40 -08:00