OSDN Git Service

android-x86/bionic.git
10 years agoMerge "Add x86_64 ucontext.h for better compatibility"
Elliott Hughes [Wed, 29 Jan 2014 23:41:22 +0000 (23:41 +0000)]
Merge "Add x86_64 ucontext.h for better compatibility"

10 years agoAdd x86_64 ucontext.h for better compatibility
Pavel Chupin [Mon, 27 Jan 2014 13:56:43 +0000 (17:56 +0400)]
Add x86_64 ucontext.h for better compatibility

As suggested here: https://android-review.googlesource.com/#/c/71267/
it may be used for x86_64 libunwind enabling.

Change-Id: I21623261a48ea7099e030d33932556e294d226ff
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Fix pthread_test to work with gtest 1.7.0."
Elliott Hughes [Wed, 29 Jan 2014 01:42:10 +0000 (01:42 +0000)]
Merge "Fix pthread_test to work with gtest 1.7.0."

10 years agoFix pthread_test to work with gtest 1.7.0.
Elliott Hughes [Wed, 29 Jan 2014 01:02:03 +0000 (17:02 -0800)]
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

10 years agoMerge "Remove a __system_property_get call from the DNS code."
Elliott Hughes [Tue, 28 Jan 2014 23:00:05 +0000 (23:00 +0000)]
Merge "Remove a __system_property_get call from the DNS code."

10 years agoRemove a __system_property_get call from the DNS code.
Elliott Hughes [Tue, 28 Jan 2014 22:54:11 +0000 (14:54 -0800)]
Remove a __system_property_get call from the DNS code.

Change-Id: I48082ad9eb1b56349c6746ab2c371728c8571a81

10 years agoMerge "bionic: Change the type of soinfo's size to size_t"
Elliott Hughes [Tue, 28 Jan 2014 21:04:03 +0000 (21:04 +0000)]
Merge "bionic: Change the type of soinfo's size to size_t"

10 years agobionic: Change the type of soinfo's size to size_t
Weiwu Chen [Tue, 3 Dec 2013 11:47:34 +0000 (19:47 +0800)]
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>
10 years agoMerge "Fix 32-bit mmap/mmap64 handling of negative offsets."
Elliott Hughes [Tue, 28 Jan 2014 00:58:50 +0000 (00:58 +0000)]
Merge "Fix 32-bit mmap/mmap64 handling of negative offsets."

10 years agoFix 32-bit mmap/mmap64 handling of negative offsets.
Elliott Hughes [Tue, 28 Jan 2014 00:28:31 +0000 (16:28 -0800)]
Fix 32-bit mmap/mmap64 handling of negative offsets.

We don't actually need to worry about sign extension if we reject
negative values ourselves. Previously it was possible to come up
with negative but aligned values that we would pass to the kernel;
in the case of mmap (as opposed to mmap64) we'd incorrectly turn
those into large positive offsets.

Change-Id: I2aa583e0f892d59bb77429aea8730b72db32dcb0

10 years agoMerge "Remove libthread_db from bionic."
Elliott Hughes [Tue, 28 Jan 2014 00:24:57 +0000 (00:24 +0000)]
Merge "Remove libthread_db from bionic."

10 years agoRemove libthread_db from bionic.
Elliott Hughes [Mon, 27 Jan 2014 23:44:24 +0000 (15:44 -0800)]
Remove libthread_db from bionic.

The NDK statically links its own copy into gdb.

Bug: 11882807
Change-Id: I0c7ed8761c32df3cc3644258551bc7d2e263f47b

10 years agoMerge "bionic: Do not use magic number for portability"
Elliott Hughes [Mon, 27 Jan 2014 22:52:07 +0000 (22:52 +0000)]
Merge "bionic: Do not use magic number for portability"

10 years agobionic: Do not use magic number for portability
Qiming Shi [Sun, 26 Jan 2014 08:49:39 +0000 (16:49 +0800)]
bionic: Do not use magic number for portability

Do not use the magic number 0xFFFFFFFFU to represent the max value of an address
as it's not correct on 64bit platform. We should use UINTPTR_MAX instead.

Change-Id: I1fc6f5864a651b2eddea2333cb0788f9d9223270
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
Signed-off-by: Weiwu Chen <weiwu.chen@intel.com>
10 years agoMerge "Remove __STDC_FORMAT_MACROS and __STDC_LIMIT_MACROS guards (and fix SIZE_MAX...
Elliott Hughes [Sat, 25 Jan 2014 01:25:16 +0000 (01:25 +0000)]
Merge "Remove __STDC_FORMAT_MACROS and __STDC_LIMIT_MACROS guards (and fix SIZE_MAX for LP64)."

10 years agoMerge "Use arch-specific variable to set up the x86 ld flags."
Ying Wang [Sat, 25 Jan 2014 00:50:53 +0000 (00:50 +0000)]
Merge "Use arch-specific variable to set up the x86 ld flags."

10 years agoUse arch-specific variable to set up the x86 ld flags.
Ying Wang [Thu, 23 Jan 2014 23:15:28 +0000 (15:15 -0800)]
Use arch-specific variable to set up the x86 ld flags.

Bug: 11654773
Change-Id: I9e9075bac1303cfa39b0f717dd74625ce1dd5fa5

10 years agoRemove __STDC_FORMAT_MACROS and __STDC_LIMIT_MACROS guards (and fix SIZE_MAX for...
Elliott Hughes [Sat, 25 Jan 2014 00:37:04 +0000 (16:37 -0800)]
Remove __STDC_FORMAT_MACROS and __STDC_LIMIT_MACROS guards (and fix SIZE_MAX for LP64).

The various committees decided that everyone should get all these macros,
all the time.

Bug: 12708004
Change-Id: Ib56010dcba9b0656e5701546fefb7f78dc0bf916

10 years agoMerge "Add all implicitly loaded symbols from libgcc.a into libgcc_compat.c."
Ben Cheng [Sat, 25 Jan 2014 00:13:10 +0000 (00:13 +0000)]
Merge "Add all implicitly loaded symbols from libgcc.a into libgcc_compat.c."

10 years agoAdd all implicitly loaded symbols from libgcc.a into libgcc_compat.c.
Ben Cheng [Fri, 24 Jan 2014 23:20:11 +0000 (15:20 -0800)]
Add all implicitly loaded symbols from libgcc.a into libgcc_compat.c.

Change-Id: I0e66a73e849a01817d016a688d7291c2fb604e48

10 years agoMerge "bionic: rename aarch64 target to arm64"
Colin Cross [Fri, 24 Jan 2014 20:33:23 +0000 (20:33 +0000)]
Merge "bionic: rename aarch64 target to arm64"

10 years agoMerge "Re-export libgcc's __aeabi_uidivmod and __popcount_tab"
Ben Cheng [Fri, 24 Jan 2014 18:11:48 +0000 (18:11 +0000)]
Merge "Re-export libgcc's __aeabi_uidivmod and __popcount_tab"

10 years agoRe-export libgcc's __aeabi_uidivmod and __popcount_tab
Bernhard Rosenkränzer [Fri, 24 Jan 2014 11:55:00 +0000 (12:55 +0100)]
Re-export libgcc's __aeabi_uidivmod and __popcount_tab

This is required to make the Nexus 10 graphics driver work on a system
compiled with gcc 4.9.

Change-Id: If3f3d488652a736d9ea3e583548d74fae3ffa902
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
10 years agobionic: rename aarch64 target to arm64
Colin Cross [Wed, 22 Jan 2014 03:50:58 +0000 (19:50 -0800)]
bionic: rename aarch64 target to arm64

Rename aarch64 build targets to arm64.  The gcc toolchain is still
aarch64.

Change-Id: Ia92d8a50824e5329cf00fd6f4f92eae112b7f3a3

10 years agoMerge "Add "__noreturn" to assert and assert2"
Elliott Hughes [Wed, 15 Jan 2014 21:26:46 +0000 (21:26 +0000)]
Merge "Add "__noreturn" to assert and assert2"

10 years agoAdd "__noreturn" to assert and assert2
Vadim Markovtsev [Mon, 13 Jan 2014 07:54:42 +0000 (11:54 +0400)]
Add "__noreturn" to assert and assert2

These functions should print assertion violation messages and then
call abort(). They do really not return control flow afterwards.
Consider the declaration of the similar __assert_fail from glibc:

extern void __assert_fail (const char *__assertion,
                           const char *__file,
   unsigned int __line,
                           const char *__function)
     __THROW __attribute__ ((__noreturn__));

Bionic has __noreturn defined in sys/cdefs.h to be that GNU
noreturn attribute.

This patch has a practical value. Consider the following function:

void check(void* ptr) {
  assert(ptr != NULL);
}

Without this patch applied, gcc (and presumably clang) shows even in
debug mode:

warning: unused parameter 'ptr' [-Wunused-parameter]

In release mode, NDEBUG is defined and assert() becomes a no-op, as
one should expect. Thus, the warning is shown correctly then.

Another code sample:

float array[2];
int i = 3;
...
assert(i < 2);
array[i] = 0;

gcc says,

warning: array subscript is below array bounds [-Warray-bounds]

In other words, without noreturn attribute, assertions do not
allow a compiler's static analyzer to properly understand
the preconditions.

Change-Id: I3be92e99787c528899cf243ed448c4730c00c45b
Signed-off-by: Vadim Markovtsev <gmarkhor@gmail.com>
10 years agoMerge "Fix libdl build warnings, turn on -Werror."
Elliott Hughes [Wed, 15 Jan 2014 02:33:33 +0000 (02:33 +0000)]
Merge "Fix libdl build warnings, turn on -Werror."

10 years agoMerge "Move _thread_created_hook to where it belongs."
Elliott Hughes [Wed, 15 Jan 2014 02:32:47 +0000 (02:32 +0000)]
Merge "Move _thread_created_hook to where it belongs."

10 years agoFix libdl build warnings, turn on -Werror.
Elliott Hughes [Wed, 15 Jan 2014 01:25:13 +0000 (17:25 -0800)]
Fix libdl build warnings, turn on -Werror.

Change-Id: I71c39b77ac1e9a92482ce71a829449100945ec86

10 years agoMove _thread_created_hook to where it belongs.
Elliott Hughes [Wed, 15 Jan 2014 01:16:18 +0000 (17:16 -0800)]
Move _thread_created_hook to where it belongs.

Change-Id: I643d761c78ccaae25270aeffa2afb811c4e2fcd7

10 years agoMerge "Make it possible for code to query the dynamic linker's default search path."
Elliott Hughes [Tue, 14 Jan 2014 20:03:20 +0000 (20:03 +0000)]
Merge "Make it possible for code to query the dynamic linker's default search path."

10 years agoMerge "AArch64: Use LDXR/STXR instead of LDAXR/STLXR for bionic_atomic_cmpxchg()"
Elliott Hughes [Tue, 14 Jan 2014 01:01:40 +0000 (01:01 +0000)]
Merge "AArch64: Use LDXR/STXR instead of LDAXR/STLXR for bionic_atomic_cmpxchg()"

10 years agoMake it possible for code to query the dynamic linker's default search path.
Elliott Hughes [Tue, 14 Jan 2014 00:37:47 +0000 (16:37 -0800)]
Make it possible for code to query the dynamic linker's default search path.

We're not going to have init(1) set LD_LIBRARY_PATH globally on 64-bit.
This patch makes it possible for libnativehelper to set LD_LIBRARY_PATH
in each Java VM (to support System.loadLibrary) without also hard-coding
the default search path there.

Change-Id: If13961fae976e06dd80d5ef522f31e8b7eb01154

10 years agoMerge "Add -Bsymbolic to the ld flags when linking the dynamic linker."
Elliott Hughes [Mon, 13 Jan 2014 21:38:16 +0000 (21:38 +0000)]
Merge "Add -Bsymbolic to the ld flags when linking the dynamic linker."

10 years agoAdd -Bsymbolic to the ld flags when linking the dynamic linker.
Elliott Hughes [Mon, 13 Jan 2014 21:33:01 +0000 (13:33 -0800)]
Add -Bsymbolic to the ld flags when linking the dynamic linker.

We don't need this on architectures other than aarch64, and
we're still investigating why we need it on aarch64, but it
doesn't seem unreasonable to have this flag set when linking
the dynamic linker anyway; it's clearly the intended behavior.

Change-Id: I4fa1b4ae543a818979934bf818eabac03bb9154f

10 years agoMerge "Add some more headers."
Elliott Hughes [Fri, 10 Jan 2014 23:35:47 +0000 (23:35 +0000)]
Merge "Add some more headers."

10 years agoAdd some more headers.
Elliott Hughes [Fri, 10 Jan 2014 23:32:31 +0000 (15:32 -0800)]
Add some more headers.

This patch adds trivial implementations of the missing sys headers
needed by strace. All strace needs are the constants and structures,
so this is enough for now. We can come back and add the functions
if/when we ever need them.

Change-Id: Idb87c1a8b6b1c62f6e16ae94f147e1169722b48e

10 years agoMerge "Add extra libc stubs for mntent related functions."
JP Abgrall [Fri, 10 Jan 2014 01:54:31 +0000 (01:54 +0000)]
Merge "Add extra libc stubs for mntent related functions."

10 years agoAdd extra libc stubs for mntent related functions.
JP Abgrall [Thu, 9 Jan 2014 22:06:20 +0000 (14:06 -0800)]
Add extra libc stubs for mntent related functions.

This adds stubs for setmntent() and endmntent().

Change-Id: I6ccaa044145405cd7226c1c54a25d435c96a2308

10 years agoMerge "Add NT_PRSTATUS to <elf.h>."
Elliott Hughes [Thu, 9 Jan 2014 23:53:58 +0000 (23:53 +0000)]
Merge "Add NT_PRSTATUS to <elf.h>."

10 years agoAdd NT_PRSTATUS to <elf.h>.
Elliott Hughes [Thu, 9 Jan 2014 23:45:07 +0000 (15:45 -0800)]
Add NT_PRSTATUS to <elf.h>.

Needed by aarch64.

Bug: 12476126
Change-Id: I7764664459a06cf4f2a60e707bd968d321a78430

10 years agoMerge "Add <sgidefs.h>."
Elliott Hughes [Thu, 9 Jan 2014 22:24:33 +0000 (22:24 +0000)]
Merge "Add <sgidefs.h>."

10 years agoMerge "Fix x86 user_regs_struct."
Elliott Hughes [Thu, 9 Jan 2014 22:23:34 +0000 (22:23 +0000)]
Merge "Fix x86 user_regs_struct."

10 years agoFix x86 user_regs_struct.
Elliott Hughes [Thu, 9 Jan 2014 22:01:18 +0000 (14:01 -0800)]
Fix x86 user_regs_struct.

I fixed x86-64 yesterday, but didn't fix x86 at the same time.

Change-Id: I5c081f5956dfedb9389af303369b841dd0fc1953

10 years agoAdd <sgidefs.h>.
Elliott Hughes [Thu, 9 Jan 2014 21:54:49 +0000 (13:54 -0800)]
Add <sgidefs.h>.

Change-Id: I543d502a81dcb8d5969f814b8a9a9c819bc4fa2c

10 years agoMerge "Add the glibc-compatible d_fileno."
Elliott Hughes [Thu, 9 Jan 2014 21:39:21 +0000 (21:39 +0000)]
Merge "Add the glibc-compatible d_fileno."

10 years agoAdd the glibc-compatible d_fileno.
Elliott Hughes [Thu, 9 Jan 2014 20:37:12 +0000 (12:37 -0800)]
Add the glibc-compatible d_fileno.

d_ino is the POSIX name, but glibc also offers d_fileno, and
that's what strace is using.

Change-Id: I3fadbe7a64700b42e78c7f4631620e864d43147b

10 years agoMerge "Fix <sys/resource.h>."
Elliott Hughes [Thu, 9 Jan 2014 19:01:14 +0000 (19:01 +0000)]
Merge "Fix <sys/resource.h>."

10 years agoFix <sys/resource.h>.
Elliott Hughes [Thu, 9 Jan 2014 18:17:03 +0000 (10:17 -0800)]
Fix <sys/resource.h>.

The situation here is a bit confusing. On 64-bit, rlimit and rlimit64 are
the same, and so getrlimit/getrlimit64, setrlimit/setrlimit64,
and prlimit/prlimit64 are all the same. On 32-bit, rlimit and rlimit64 are
different. 32-bit architectures other than MIPS go one step further by having
an even more limited getrlimit system call, so arm and x86 need to use
ugetrlimit instead of getrlimit. Worse, the 32-bit architectures don't have
64-bit getrlimit- and setrlimit-equivalent system calls, and you have to use
prlimit64 instead. There's no 32-bit prlimit system call, so there's no
easy implementation of that --- what should we do if the result of prlimit64
won't fit in a struct rlimit? Since 32-bit survived without prlimit/prlimit64
for this long, I'm not going to bother implementing prlimit for 32-bit.

We need the rlimit64 functions to be able to build strace 4.8 out of the box.

Change-Id: I1903d913b23016a2fc3b9f452885ac730d71e001

10 years agoMerge "Our dirent is a dirent64."
Elliott Hughes [Thu, 9 Jan 2014 01:15:27 +0000 (01:15 +0000)]
Merge "Our dirent is a dirent64."

10 years agoMerge "Add <sys/reg.h>."
Elliott Hughes [Thu, 9 Jan 2014 01:15:10 +0000 (01:15 +0000)]
Merge "Add <sys/reg.h>."

10 years agoOur dirent is a dirent64.
Elliott Hughes [Thu, 9 Jan 2014 00:31:36 +0000 (16:31 -0800)]
Our dirent is a dirent64.

Change-Id: Idc9ebfd900fddd4f7c7ac95bc9b74401ebc801a3

10 years agoAdd <sys/reg.h>.
Elliott Hughes [Thu, 9 Jan 2014 00:29:22 +0000 (16:29 -0800)]
Add <sys/reg.h>.

This describes the offsets into ptrace's returned arrays of registers
for x86 and x86-64.

Change-Id: I044f03e286673999a298b73a813d4ad366625845

10 years agoMerge "Fix x86_64 register names in <sys/user.h>."
Elliott Hughes [Thu, 9 Jan 2014 00:24:55 +0000 (00:24 +0000)]
Merge "Fix x86_64 register names in <sys/user.h>."

10 years agoMerge "We shouldn't have a <sys/dirent.h> that's a subset of <dirent.h>."
Elliott Hughes [Thu, 9 Jan 2014 00:24:31 +0000 (00:24 +0000)]
Merge "We shouldn't have a <sys/dirent.h> that's a subset of <dirent.h>."

10 years agoFix x86_64 register names in <sys/user.h>.
Elliott Hughes [Wed, 8 Jan 2014 23:54:19 +0000 (15:54 -0800)]
Fix x86_64 register names in <sys/user.h>.

Change-Id: Ieb327247a41f6195589716170e324d1cd1251b96

10 years agoWe shouldn't have a <sys/dirent.h> that's a subset of <dirent.h>.
Elliott Hughes [Wed, 8 Jan 2014 23:51:13 +0000 (15:51 -0800)]
We shouldn't have a <sys/dirent.h> that's a subset of <dirent.h>.

glibc has no <sys/dirent.h>. If we do have to bring this back, we
should probably just have one file #include the other.

Change-Id: I5c0bf9c03769daf3b23f69778e9f01f81c3de9ec

10 years agoMerge "<sched.h> should offer both __sched_priority and sched_priority."
Elliott Hughes [Wed, 8 Jan 2014 02:41:04 +0000 (02:41 +0000)]
Merge "<sched.h> should offer both __sched_priority and sched_priority."

10 years agoMerge "<fcntl.h> should get you the POSIX_FADV_* constants."
Elliott Hughes [Wed, 8 Jan 2014 02:40:44 +0000 (02:40 +0000)]
Merge "<fcntl.h> should get you the POSIX_FADV_* constants."

10 years agoMerge "Add SWAP_FLAG_* constants to <sys/swap.h>."
Elliott Hughes [Wed, 8 Jan 2014 02:31:55 +0000 (02:31 +0000)]
Merge "Add SWAP_FLAG_* constants to <sys/swap.h>."

10 years agoAdd SWAP_FLAG_* constants to <sys/swap.h>.
Elliott Hughes [Wed, 8 Jan 2014 01:46:06 +0000 (17:46 -0800)]
Add SWAP_FLAG_* constants to <sys/swap.h>.

Bug: 9336527
Change-Id: I679be4d8425ba177dd782e714f465caf9daa976c

10 years agoMerge "Define fsid_t as well as __fsid_t."
Elliott Hughes [Wed, 8 Jan 2014 02:11:04 +0000 (02:11 +0000)]
Merge "Define fsid_t as well as __fsid_t."

10 years ago<sched.h> should offer both __sched_priority and sched_priority.
Elliott Hughes [Wed, 8 Jan 2014 01:48:30 +0000 (17:48 -0800)]
<sched.h> should offer both __sched_priority and sched_priority.

If glibc hadn't already done things this way round, I'd have
called the field sched_priority and the macro __sched_priority
since that would seem less likely to cause trouble, but glibc
source compatibility is probably more important.

Change-Id: I8a8a477f2aa87cae641069c5c84b4fcab3152a82

10 years ago<fcntl.h> should get you the POSIX_FADV_* constants.
Elliott Hughes [Wed, 8 Jan 2014 01:47:20 +0000 (17:47 -0800)]
<fcntl.h> should get you the POSIX_FADV_* constants.

Change-Id: I9de8b840570b228308c12d72b7617b8758237fb8

10 years agoDefine fsid_t as well as __fsid_t.
Elliott Hughes [Wed, 8 Jan 2014 01:44:51 +0000 (17:44 -0800)]
Define fsid_t as well as __fsid_t.

Change-Id: Ib8efbd913a0e6bfe27b88c1342bd5cec926dd74e

10 years agoMerge "Regenerate the NOTICE files."
Elliott Hughes [Tue, 7 Jan 2014 21:48:31 +0000 (21:48 +0000)]
Merge "Regenerate the NOTICE files."

10 years agoRegenerate the NOTICE files.
Elliott Hughes [Sat, 4 Jan 2014 00:40:37 +0000 (16:40 -0800)]
Regenerate the NOTICE files.

Also standardize the orthography in a few places to reduce near-duplicates
in the NOTICE files.

Change-Id: I347c75e817be61ec1b9c5b4b96226feedc8d09ab

10 years agoMerge "Add cfi directives to x86 syscalls."
Christopher Ferris [Tue, 7 Jan 2014 01:36:44 +0000 (01:36 +0000)]
Merge "Add cfi directives to x86 syscalls."

10 years agoAdd cfi directives to x86 syscalls.
Christopher Ferris [Tue, 7 Jan 2014 00:39:10 +0000 (16:39 -0800)]
Add cfi directives to x86 syscalls.

Modify the syscalls script to generate the cfi directives for x86
syscalls.

Update the x86 syscalls.

Change-Id: Ia1993dc714a7e79f917087fff8200e9a02c52603

10 years agoMerge "Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone"
Elliott Hughes [Mon, 6 Jan 2014 23:37:20 +0000 (23:37 +0000)]
Merge "Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone"

10 years agoMerge "Fix dev_t (for LP64)."
Elliott Hughes [Mon, 6 Jan 2014 20:37:02 +0000 (20:37 +0000)]
Merge "Fix dev_t (for LP64)."

10 years agoMerge "Add TCPOPT_* constants."
Elliott Hughes [Mon, 6 Jan 2014 20:34:17 +0000 (20:34 +0000)]
Merge "Add TCPOPT_* constants."

10 years agoPass a valid stack pointer to __bionic_clone in pthread.__bionic_clone
Chris Dearman [Sat, 4 Jan 2014 12:57:39 +0000 (12:57 +0000)]
Pass a valid stack pointer to __bionic_clone in pthread.__bionic_clone

__bionic_clone modifies the child stack before cloning so the stack
pointer should be valid. The test is expecting an EINVAL error to be
generated from the incorrect flags: CLONE_THREAD set without
CLONE_SIGHAND.

Change-Id: Ic02192081f6f52df6f03d9810efa82d923247a11

10 years agoAdd TCPOPT_* constants.
Elliott Hughes [Fri, 3 Jan 2014 23:58:40 +0000 (15:58 -0800)]
Add TCPOPT_* constants.

Adds the TCPOPT_* constants from NetBSD. Note that the BSDs also have
TCPOPT_SIGNATURE, but Linux calls that TCPOPT_MD5SIG and glibc doesn't
have any corresponding constant yet, so let's wait until we see which name
wins out.

Change-Id: If53cdada5595285d9a7e7248ef74cd7502d804c0

10 years agoFix dev_t (for LP64).
Elliott Hughes [Fri, 3 Jan 2014 22:49:37 +0000 (14:49 -0800)]
Fix dev_t (for LP64).

32-bit Android's dev_t was wrong too. We can't fix that without ABI breakage,
but we can at least fix 64-bit Android. And add tests.

Bug: https://code.google.com/p/android/issues/detail?id=54966
Change-Id: Ie2e42cc042b78b669a1a44e55f959dbd9c52c5c9

10 years agoMerge "Remove as many hard-coded constants from the MIPS vfork.S as possible."
Elliott Hughes [Fri, 3 Jan 2014 22:36:53 +0000 (22:36 +0000)]
Merge "Remove as many hard-coded constants from the MIPS vfork.S as possible."

10 years agoRemove as many hard-coded constants from the MIPS vfork.S as possible.
Elliott Hughes [Thu, 2 Jan 2014 23:41:33 +0000 (15:41 -0800)]
Remove as many hard-coded constants from the MIPS vfork.S as possible.

We could do better, but not without MIPS cleaning up their kernel headers.

Change-Id: Ib4d4ce5d720ce8ca27a3f9a1ae07a9a277675af9

10 years agoMerge "Use the MAX_ERRNO constant."
Elliott Hughes [Fri, 3 Jan 2014 00:24:45 +0000 (00:24 +0000)]
Merge "Use the MAX_ERRNO constant."

10 years agoUse the MAX_ERRNO constant.
Elliott Hughes [Fri, 3 Jan 2014 00:23:24 +0000 (16:23 -0800)]
Use the MAX_ERRNO constant.

If you're going to hardcode a constant, you could at least try to
get the constant right...

Change-Id: I886a2593357d1c4dfd6c42649c63e8a35c15a441

10 years agoMerge "Remove a hardcoded constant from aarch64's vfork."
Elliott Hughes [Thu, 2 Jan 2014 22:18:36 +0000 (22:18 +0000)]
Merge "Remove a hardcoded constant from aarch64's vfork."

10 years agoRemove a hardcoded constant from aarch64's vfork.
Elliott Hughes [Thu, 2 Jan 2014 22:17:30 +0000 (14:17 -0800)]
Remove a hardcoded constant from aarch64's vfork.

Change-Id: Ifc09ca066c32988b8cc9db9e808b9ef4c4d2bfcb

10 years agoMerge "Clean up <sched.h>."
Elliott Hughes [Thu, 2 Jan 2014 21:46:53 +0000 (21:46 +0000)]
Merge "Clean up <sched.h>."

10 years agoClean up <sched.h>.
Elliott Hughes [Thu, 2 Jan 2014 20:05:50 +0000 (12:05 -0800)]
Clean up <sched.h>.

This patch switches to using the uapi constants. It also adds the missing
setns system call, fixes sched_getcpu's error behavior, and fixes the
gensyscalls script now ARM is uapi-only too.

Change-Id: I8e16b1693d6d32cd9b8499e46b5d8b0a50bc4f1d

10 years agoMerge "Fix MIPS build."
Elliott Hughes [Sun, 22 Dec 2013 20:03:07 +0000 (20:03 +0000)]
Merge "Fix MIPS build."

10 years agoFix MIPS build.
Elliott Hughes [Sun, 22 Dec 2013 20:02:32 +0000 (12:02 -0800)]
Fix MIPS build.

Change-Id: I175f427e355fca9a5a3f4e4379d7fcd1f7f6a22d

10 years agoMerge "Improve dynamic linker diagnostics for internal errors."
Elliott Hughes [Sun, 22 Dec 2013 19:39:41 +0000 (19:39 +0000)]
Merge "Improve dynamic linker diagnostics for internal errors."

10 years agoImprove dynamic linker diagnostics for internal errors.
Elliott Hughes [Sun, 22 Dec 2013 00:07:45 +0000 (16:07 -0800)]
Improve dynamic linker diagnostics for internal errors.

If the linker can't resolve its own internal references to symbols,
we currently exit silently (albeit with EXIT_FAILURE). Not very helpful.

Change-Id: I1614fc970dee4560b38832ede1987b65a8e53a1e

10 years agoMerge "Remove the bogus exit status from _exit_with_stack_teardown."
Elliott Hughes [Sun, 22 Dec 2013 19:36:55 +0000 (19:36 +0000)]
Merge "Remove the bogus exit status from _exit_with_stack_teardown."

10 years agoRemove the bogus exit status from _exit_with_stack_teardown.
Elliott Hughes [Sat, 21 Dec 2013 23:30:49 +0000 (15:30 -0800)]
Remove the bogus exit status from _exit_with_stack_teardown.

It should always be 0, and there's no reason to pass a constant in as
an argument.

Change-Id: I92ac59b718a18e298bd7c52821af447f9181ca2a

10 years agoMerge "Fix MIPS build."
Elliott Hughes [Sat, 21 Dec 2013 02:47:01 +0000 (02:47 +0000)]
Merge "Fix MIPS build."

10 years agoFix MIPS build.
Elliott Hughes [Sat, 21 Dec 2013 02:46:14 +0000 (18:46 -0800)]
Fix MIPS build.

Change-Id: Idd3bcda1803fd16b728a352d325bb070aed8fd94

10 years agoMerge "Avoid sign extension in 32-bit mmap."
Elliott Hughes [Sat, 21 Dec 2013 02:23:35 +0000 (02:23 +0000)]
Merge "Avoid sign extension in 32-bit mmap."

10 years agoMerge "Remove some old kernel header cruft not needed with uapi."
Elliott Hughes [Sat, 21 Dec 2013 02:21:13 +0000 (02:21 +0000)]
Merge "Remove some old kernel header cruft not needed with uapi."

10 years agoAvoid sign extension in 32-bit mmap.
Elliott Hughes [Sat, 21 Dec 2013 02:17:34 +0000 (18:17 -0800)]
Avoid sign extension in 32-bit mmap.

Change-Id: I2a77925f62f381a0b34648c3db8154a55dd80c46

10 years agoRemove some old kernel header cruft not needed with uapi.
Elliott Hughes [Sat, 21 Dec 2013 01:26:30 +0000 (17:26 -0800)]
Remove some old kernel header cruft not needed with uapi.

Change-Id: If543b056ae40f0eb660be4a0629ad22f4c4cb92f

10 years agoMerge "Fix aarch64 futex assembly routines."
Elliott Hughes [Sat, 21 Dec 2013 01:20:22 +0000 (01:20 +0000)]
Merge "Fix aarch64 futex assembly routines."

10 years agoFix aarch64 futex assembly routines.
Elliott Hughes [Sat, 21 Dec 2013 00:58:06 +0000 (16:58 -0800)]
Fix aarch64 futex assembly routines.

Also make the other architectures more similar to one another,
use NULL instead of 0 in calling code, and remove an unused #define.

Change-Id: I52b874afb6a351c802f201a0625e484df6d093bb

10 years agoMerge "Allocate additional space on stack for indirect syscall"
Elliott Hughes [Fri, 20 Dec 2013 23:36:32 +0000 (23:36 +0000)]
Merge "Allocate additional space on stack for indirect syscall"

10 years agoAllocate additional space on stack for indirect syscall
Chris Dearman [Mon, 16 Dec 2013 22:10:13 +0000 (14:10 -0800)]
Allocate additional space on stack for indirect syscall

The caller is only required to allocate 16 bytes on the
stack for a0-a3. syscall is handling up to 6 arguments so
additional space is needed on the stack to avoid corrupting the
callers frame.

Change-Id: I054b31696decc3e17d9c70af18cd278b852235d1

10 years agoMerge "Fix backwards compatible system property structure"
Greg Hackmann [Fri, 20 Dec 2013 21:54:38 +0000 (21:54 +0000)]
Merge "Fix backwards compatible system property structure"