Commit Graph

5319 Commits

Author SHA1 Message Date
Elliott Hughes
b4f7616fd6 Ensure we have the off64_t variant of every function that takes an off_t.
Change-Id: Ib2eee0cf13162be3b62559b84e90c6dcf5aab1c3
2013-09-19 16:27:24 -07:00
Elliott Hughes
35cfcc11fa am f8e71bac: Merge "Add mmap64()"
* commit 'f8e71bac14a4bc52cc95c56adfe042c3938279b5':
  Add mmap64()
2013-09-19 14:25:00 -07:00
Elliott Hughes
f8e71bac14 Merge "Add mmap64()" 2013-09-19 21:22:42 +00:00
Daniel Leung
afcc0cccda Add mmap64()
This adds mmap64() to bionic so that it is possible to have
large offset passed to kernel. However, the syscall mechanism
only passes 32-bit number to kernel. So effectively, the
largest offset that can be passed is about 43 bits (since
offset is signed, and the number passed to kernel is number
of pages (page size == 4K => 12 bits)).

Change-Id: Ib54f4e9b54acb6ef8b0324f3b89c9bc810b07281
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2013-09-19 14:11:26 -07:00
Elliott Hughes
fd5f6f192a am d5ddf40e: Merge "Fix host tests that need the shell."
* commit 'd5ddf40ecf72a03e38164389555ccdade779ab5a':
  Fix host tests that need the shell.
2013-09-19 12:05:09 -07:00
Elliott Hughes
94c325fb3b am 269851bf: Merge "Declare __page_shift and __page_size with C linkage."
* commit '269851bf950049f16eeb2a402f700952480bcecf':
  Declare __page_shift and __page_size with C linkage.
2013-09-19 12:05:08 -07:00
Elliott Hughes
d5ddf40ecf Merge "Fix host tests that need the shell." 2013-09-19 19:04:10 +00:00
Elliott Hughes
269851bf95 Merge "Declare __page_shift and __page_size with C linkage." 2013-09-19 19:03:19 +00:00
Bernhard Rosenkraenzer
9ae59c02ca Declare __page_shift and __page_size with C linkage.
__page_shift and __page_size were accidentally declared in unistd.h with
C linkage - their implementation needs to use the same linkage.

Going forward, though, let's stop the inlining madness and let's kill
the non-standard __getpageshift(). This patch takes getpagesize(3) out
of line and removes __getpageshift but fixes __page_shift and __page_size
for backwards binary compatibility.

Change-Id: I35ed66a08989ced1db422eb03e4d154a5d6b5bda
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2013-09-19 11:55:36 -07:00
Elliott Hughes
8ff879a528 am a259472c: Merge "Fix mismatch between declaration and forward declaration"
* commit 'a259472ca076ee230523e63502999be13a3f72d2':
  Fix mismatch between declaration and forward declaration
2013-09-19 11:44:11 -07:00
Elliott Hughes
a259472ca0 Merge "Fix mismatch between declaration and forward declaration" 2013-09-19 18:41:06 +00:00
Elliott Hughes
e60c4f0a6c Fix host tests that need the shell.
By making the /system/bin/sh available.

Change-Id: I99200c1ddc922a2f6b5cea8ff2da98aedbe70e7b
2013-09-19 11:28:20 -07:00
Elliott Hughes
26e71c1987 am 045f311b: Merge "Use and to find the tzdata."
* commit '045f311b0a5b3ceed09dfc4b4246c99183a2cef4':
  Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.
2013-09-19 11:21:21 -07:00
Elliott Hughes
045f311b0a Merge "Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata." 2013-09-19 18:19:00 +00:00
Elliott Hughes
cf178bf7d0 Use $ANDROID_DATA and $ANDROID_ROOT to find the tzdata.
This lets us run binaries linked against bionic on an x86 host.

Change-Id: Icd60cf99a90d747c77304c05b4f764e4d26af985
2013-09-19 11:17:42 -07:00
Nick Kralevich
0c12f125cf am 814bbd52: Merge "Update netlink.h from tip-of-tree external/kernel-headers"
* commit '814bbd521affba78db04135515bae1f5e099bbd9':
  Update netlink.h from tip-of-tree external/kernel-headers
2013-09-18 21:06:43 -07:00
Nick Kralevich
814bbd521a Merge "Update netlink.h from tip-of-tree external/kernel-headers" 2013-09-19 04:04:07 +00:00
Elliott Hughes
2443358b37 am 4a509d89: Merge "Add bionic-unit-tests-run-on-host special target"
* commit '4a509d898e24cefe0f7f0edf927b11ce7c304c81':
  Add bionic-unit-tests-run-on-host special target
2013-09-18 19:17:55 -07:00
Elliott Hughes
4a509d898e Merge "Add bionic-unit-tests-run-on-host special target" 2013-09-19 02:16:00 +00:00
Pavel Chupin
f22fb68751 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>
2013-09-18 19:09:24 -07:00
Nick Kralevich
45e52faeb7 Update netlink.h from tip-of-tree external/kernel-headers
This file was generated using bionic/libc/kernel/tools/update_all.py

The only change is a new netlink.h file, from external/kernel-headers.
Please see the commit message there for details.

Change-Id: I83645b88f0baff838131197913ebd70be69abd3f
2013-09-18 17:14:02 -07:00
Bernhard Rosenkraenzer
edad1e1558 Fix mismatch between declaration and forward declaration
KernelArgumentBlock is defined as a class in KernelArgumentBlock.h, but
forward declarations refer to it as a struct.

While this is essentially the same, the mismatch causes a compiler
warning in clang (and may cause warnings in future versions of gcc) in
code that is supposed to be compiled with -Werror.

Change-Id: I4ba49d364c44d0a42c276aff3a8098300dbdcdf0
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2013-09-18 23:40:19 +02:00
Brian Carlstrom
059f5c3f6c am 8512992f: Merge "Simplify main thread stack size initialization"
* commit '8512992f50e8444c1985bbeb17c3385a58fc0fed':
  Simplify main thread stack size initialization
2013-09-13 17:02:51 -07:00
Brian Carlstrom
5f0b5108e3 am 850f59d8: Merge "Use kernel default for initial thread size"
* commit '850f59d8516c7060be9484e9771aa54231e8ff48':
  Use kernel default for initial thread size
2013-09-13 17:02:50 -07:00
Brian Carlstrom
8512992f50 Merge "Simplify main thread stack size initialization" 2013-09-14 00:00:41 +00:00
Brian Carlstrom
850f59d851 Merge "Use kernel default for initial thread size" 2013-09-14 00:00:33 +00:00
Brian Carlstrom
50af69e8f3 Simplify main thread stack size initialization
Change-Id: Iec09433d9de501031cce09dc75848a5e8f3d96bf
2013-09-13 16:44:47 -07:00
Brian Carlstrom
322e7bce23 Use kernel default for initial thread size
Bug: 10697851

Change-Id: I8d980f5e0b584799536f6e6b891056c968d26cdf
2013-09-13 16:25:25 -07:00
Christopher Ferris
1a88ca0804 am 98c726ec: Merge "Add the dl_iterate_phdr function to libdl for arm."
* commit '98c726ec9b40e75efdd3ea027cd9cc627329f85e':
  Add the dl_iterate_phdr function to libdl for arm.
2013-09-06 10:54:56 -07:00
Christopher Ferris
98c726ec9b Merge "Add the dl_iterate_phdr function to libdl for arm." 2013-09-06 17:52:35 +00:00
Christopher Ferris
24053a461e Add the dl_iterate_phdr function to libdl for arm.
Bug: 8410085

Merge from internal master.

(cherry-picked from cb491bc66d)

Change-Id: I94ed51bc5d4c626df7552c0e85c31ccee2d6568f
2013-09-06 09:53:54 -07:00
Elliott Hughes
5d094c4088 am df7436e7: Merge "Avoid segfaults if properties are not initialized"
* commit 'df7436e709035fb6f5667980042848c8b4ca3e79':
  Avoid segfaults if properties are not initialized
2013-09-03 14:09:08 -07:00
Elliott Hughes
df7436e709 Merge "Avoid segfaults if properties are not initialized" 2013-09-03 21:07:16 +00:00
Elliott Hughes
1e96d49a7d am afa31042: Merge "Fix strchr for basic non-sse case on x86"
* commit 'afa310427e04f067976e5b979e2cceb3d759bf3f':
  Fix strchr for basic non-sse case on x86
2013-09-03 14:05:51 -07:00
Elliott Hughes
afa310427e Merge "Fix strchr for basic non-sse case on x86" 2013-09-03 21:03:39 +00:00
Pavel Chupin
3c4b50fd8c Fix strchr for basic non-sse case on x86
Fix source location. Move declaration of __strchr_chk out of
ifdef __BIONIC_FORTIFY which should be available for strchr.cpp
compilation when __BIONIC_FORTIFY is not defined.

Change-Id: I552a6e16656e59b276b322886cfbf57bbfb2e6a7
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-09-03 16:20:52 +04:00
Pavel Chupin
a21e696d90 Avoid segfaults if properties are not initialized
Null or constant dereferencing occurs if properties are not initialized.
On Android devices it shouldn't happen but can be faced if testing bionic
libc.so on Linux host.

Change-Id: I8f047cbe17d0e7bcde40ace000a8aa53789c16cb
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2013-09-03 13:27:09 +04:00
Christopher Ferris
fc24bc2544 am 99b859cf: Merge "Move stack unwinding test into library."
* commit '99b859cf786f208300f7fc3a6fa5b570c3333433':
  Move stack unwinding test into library.
2013-08-29 14:16:18 -07:00
Christopher Ferris
99b859cf78 Merge "Move stack unwinding test into library." 2013-08-29 21:13:22 +00:00
Christopher Ferris
8240bed918 Move stack unwinding test into library.
Bug: 8291716
Change-Id: Ia270f074b574a8fe86b5ad435bdef80999c64295
2013-08-29 14:00:25 -07:00
Nick Kralevich
89dcc10c32 am 4e3ed44d: Merge "cdefs.h: introduce __bos0"
* commit '4e3ed44db1200ca810842b0667e7fc80125de28d':
  cdefs.h: introduce __bos0
2013-08-28 14:33:59 -07:00
Nick Kralevich
4e3ed44db1 Merge "cdefs.h: introduce __bos0" 2013-08-28 21:31:55 +00:00
Nick Kralevich
bd8e6749b7 cdefs.h: introduce __bos0
Introduce __bos0 as a #define for __builtin_object_size((s), 0).
This macro is intended to be used for places where the standard
__bos macro isn't appropriate.

memcpy, memmove, and memset deliberately use __bos0. This is done
for two reasons:

1) I haven't yet tested to see if __bos is safe to use.
2) glibc uses __bos0 for these methods.

Change-Id: Ifbe02efdb10a72fe3529dbcc47ff647bde6feeca
2013-08-28 14:27:14 -07:00
Nick Kralevich
cfd0d72da8 am eb8f3622: Merge "FORTIFY_SOURCE: introduce __strncpy_chk2"
* commit 'eb8f36223e51db626a23b8032f03c095be80998b':
  FORTIFY_SOURCE: introduce __strncpy_chk2
2013-08-28 13:05:38 -07:00
Nick Kralevich
eb8f36223e Merge "FORTIFY_SOURCE: introduce __strncpy_chk2" 2013-08-28 20:04:06 +00:00
Nick Kralevich
93501d3ab8 FORTIFY_SOURCE: introduce __strncpy_chk2
This change detects programs reading beyond the end of "src" when
calling strncpy.

Change-Id: Ie1b42de923385d62552b22c27b2d4713ab77ee03
2013-08-28 12:39:06 -07:00
Christopher Ferris
d923b3075c am 2557433d: Merge "Change hard-coded directory."
* commit '2557433d8ea4c489f061170822f34f038b930b96':
  Change hard-coded directory.
2013-08-27 17:38:07 -07:00
Christopher Ferris
2557433d8e Merge "Change hard-coded directory." 2013-08-28 00:35:12 +00:00
Christopher Ferris
5227bb363d Change hard-coded directory.
The tests are using /data/data which is not accessible to a non-root
user. Change this to /data/local/tmp which is accessible to all users.

Bug: 8291716

Change-Id: I66476bbbaf5d1dc0c103863abf9219405f06a85b
2013-08-27 17:22:34 -07:00
Christopher Ferris
7a2c2784a6 am 1f216e30: Merge "Create bionic unit test library for use with CTS."
* commit '1f216e30b6a9301211193d05f995cdefbdc9619f':
  Create bionic unit test library for use with CTS.
2013-08-27 17:20:39 -07:00