Commit Graph

3520 Commits

Author SHA1 Message Date
Ben Cheng
0c45d8568d am 08af3aae: am e884a039: am dcc18ea4: Merge "Add C linkage for __open_2 and __openat_2."
* commit '08af3aae104611d269d942354791e5bcb693ceee':
  Add C linkage for __open_2 and __openat_2.
2013-12-19 19:13:00 +00:00
Ben Cheng
c13d89b829 Add C linkage for __open_2 and __openat_2.
Otherwise Clang mangle them with C++ names.

Change-Id: I844e28d834df8b0752b32d2aadd2013fc8804a43
2013-12-19 10:49:20 -08:00
Christopher Ferris
f36c3ea8ff resolved conflicts for merge of 85e0dd89 to master
Change-Id: I21f7ffb9a582681877e2dbad54185ee37d18410e
2013-12-18 23:43:36 -08:00
Christopher Ferris
81ddd14381 Merge "Remove the non-uapi kernel headers." 2013-12-19 06:58:53 +00:00
Nick Kralevich
f9c4078ab7 am c92f7f57: am c1624712: am 25447aec: Merge "Clean up more recursive FORTIFY_SOURCE calls"
* commit 'c92f7f57cf0b3a72f1447a0de99a18727d89d933':
  Clean up more recursive FORTIFY_SOURCE calls
2013-12-19 05:57:53 +00:00
Nick Kralevich
e4c6b08c4e Clean up more recursive FORTIFY_SOURCE calls
Don't use FORTIFY_SOURCE on functions which implement
FORTIFY_SOURCE, to avoid infinite recursion problems.

The previous patch only addressed one of the problems.

Bug: 12216860
Change-Id: I6f30ae7cb5b481be9942add18182ea4839d348a6
2013-12-18 19:17:14 -08:00
Nick Kralevich
2e437261e3 am feceab73: am 58a2429b: am 4063bb61: Merge "__strnlen_chk: avoid recursive strlen calls"
* commit 'feceab7366c03b792c7679b8969bc573dc579ad2':
  __strnlen_chk: avoid recursive strlen calls
2013-12-19 03:06:16 +00:00
Nick Kralevich
ddea383433 __strnlen_chk: avoid recursive strlen calls
Don't use FORTIFY_SOURCE on functions which implement
FORTIFY_SOURCE.

Bug: 12216860
Change-Id: I61db1b47ccdd6bdcf41eab3303f4806494016199
2013-12-18 18:17:52 -08:00
Elliott Hughes
2abef87f7d am 9baf4839: am 3761f453: am f5897dcb: Merge "Fix linking of aarch64 static binaries."
* commit '9baf483936ef238d3961c281c6bc7280aec7069c':
  Fix linking of aarch64 static binaries.
2013-12-18 23:42:20 +00:00
Elliott Hughes
28d4b9bbcb Fix linking of aarch64 static binaries.
Change-Id: If1fa8b560074058b8f7ef32db21a7ca3c53d1fd7
2013-12-18 15:22:08 -08:00
Elliott Hughes
106e82ea29 am e567b596: am 512ff272: am 0b61567f: Merge "Fix the x86-64 int64_t/uint64_t."
* commit 'e567b596fe9a25584264ecf4a19ba4407d81d0ed':
  Fix the x86-64 int64_t/uint64_t.
2013-12-18 22:49:09 +00:00
Elliott Hughes
5c7795da84 am 85434881: am dce31dac: am 717ad649: Merge "Don\'t use __kernel_ulong_t."
* commit '85434881d33e8cb527c942c11e7d4c81ff3b56ca':
  Don't use __kernel_ulong_t.
2013-12-18 22:49:01 +00:00
Elliott Hughes
ba9fee97cf Fix the x86-64 int64_t/uint64_t.
This now matches aarch64, which was already correct.

Bug: 12213562
Change-Id: I5da19f0af98347992fea2a62938472f86427740f
2013-12-18 14:00:14 -08:00
Elliott Hughes
ad8842f5c6 Don't use __kernel_ulong_t.
Change-Id: Ifdfbac0ac6da647276a84bd64bb342bb5a07ad61
2013-12-18 12:22:33 -08:00
Elliott Hughes
72b430b5cc am 72f5da94: am 67c42d1d: am 7649766b: Merge "Remove <machine/kernel.h>."
* commit '72f5da943cd2ab5660753c7284e24433c3bb9efa':
  Remove <machine/kernel.h>.
2013-12-18 19:42:06 +00:00
Elliott Hughes
2b333ea31e Remove <machine/kernel.h>.
Bug: 12175484
Change-Id: I127f7f91f36bd879109d653e0c56ec56e2529d4d
2013-12-18 11:21:55 -08:00
Christopher Ferris
be5231442b Remove the non-uapi kernel headers.
Bug: 11559337
Change-Id: Id1ee4dadbd673cf35b9c79bc87f9a6fb7b2253c6
2013-12-18 10:34:18 -08:00
Elliott Hughes
a0c2cc7009 am 42513bf8: am 78ce7cbf: am d2bcbf0d: Merge "Small style cleanup."
* commit '42513bf8482fdb896f72d0d882973ebc4ade9aa2':
  Small style cleanup.
2013-12-18 18:22:00 +00:00
Elliott Hughes
67a5d0a429 am 03335d91: am 136e7f2b: am 611b903c: Merge "Properly detect timeout in pthread_mutex_lock_timeout_np_impl"
* commit '03335d91248aaf4c70a126fbf80481a924c4588b':
  Properly detect timeout in pthread_mutex_lock_timeout_np_impl
2013-12-18 18:09:26 +00:00
Elliott Hughes
977d4e0dc6 am 93e05879: am debc37b4: am e00f4890: Merge "Move bionic over to GCC\'s \'warning\' attribute."
* commit '93e058796760763f414e3403dca6d7f7781f73b8':
  Move bionic over to GCC's 'warning' attribute.
2013-12-18 18:05:58 +00:00
Elliott Hughes
9e79af3b61 Small style cleanup.
Change-Id: Ib45a4a2296232968296f9bd7cc3592ba46fd412d
2013-12-18 10:05:42 -08:00
Elliott Hughes
31d0542bcd am 0652fc66: am 63d56a00: am 62e6fe58: Merge "Fix compilation of crtbegin.c and pthread_debug.cpp."
* commit '0652fc667d86a646dc0011e9529bc59145e4bef4':
  Fix compilation of crtbegin.c and pthread_debug.cpp.
2013-12-18 18:02:35 +00:00
Elliott Hughes
611b903ca7 Merge "Properly detect timeout in pthread_mutex_lock_timeout_np_impl" 2013-12-18 17:56:22 +00:00
Elliott Hughes
e00f4890c7 Merge "Move bionic over to GCC's 'warning' attribute." 2013-12-18 17:52:18 +00:00
Elliott Hughes
e7c59f9e20 Fix compilation of crtbegin.c and pthread_debug.cpp.
Because there was no default := for the aarch64 libc_crt_target_cflags,
the += was causing libc_crt_target_cflags to be recursively-defined
variable, which meant that when we were compiling crtbegin.c LOCAL_PATH
would be bionic/tests/ and we'd have -Ibionic/tests/include/ and find
none of our include files.

Also fix linking of pthread_debug.cpp, at least in the disabled mode.
The enabled mode was already broken for all architectures, and continues
to be broken after this change. It's been broken for long enough that
we might want to just remove it...

(aarch64 is using the FSF linker where arm uses the gold linker.)

Change-Id: I7db2e386694f6933db043138e6e97e5ae54d4174
2013-12-18 09:47:44 -08:00
Elliott Hughes
c13fb75cea Move bionic over to GCC's 'warning' attribute.
This is a better solution than the old __warn_references because it's
a compile-time rather than link-time warning, it doesn't rely on something
that doesn't appear to be supported by gold (which is why you only used
to see these warnings on mips builds), and the errors refer to the exact
call site(s) rather than just telling you which object file contains a
reference to the bad function.

This is primarily so we can build bionic for aarch64; building libc.so
caused these warnings to fire (because link time is the wrong time) and
warnings are errors.

Change-Id: I5df9281b2a9d98b164a9b11807ea9472c6faa9e3
2013-12-17 20:43:30 -08:00
Elliott Hughes
a414f53e84 am 949295bb: am 22013ac4: am f293b157: Merge "AArch64: Linker64 support for AArch64"
* commit '949295bb87ea710e4c2c5353e39e52eafa0e1d05':
  AArch64: Linker64 support for AArch64
2013-12-17 23:22:40 +00:00
Marcus Oakland
e365f9d654 AArch64: Linker64 support for AArch64
Addition of support for AArch64 in the linker64 target.

Change-Id: I8dfd9711278f6706063e91f626b6007ea7a3dd6e
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
2013-12-17 15:02:43 -08:00
Ken Mixter
4fae14f333 Properly detect timeout in pthread_mutex_lock_timeout_np_impl
Previously we were checking against a positive errno which
would not be returned from a system call.

Change-Id: I8e3a36f6fbf5ccc2191a152a1def37e2d6f93124
2013-12-17 14:26:01 -08:00
Elliott Hughes
47fb66a50b am fc61a873: am 1a92f739: am c858b567: Merge "AArch64: Add initial support for AArch64"
* commit 'fc61a87345c5d2e8d156aa9e38aab2f65d3c5670':
  AArch64: Add initial support for AArch64
2013-12-17 01:14:12 +00:00
Serban Constantinescu
e210488e0d AArch64: Add initial support for AArch64
This is the first patch out of a series of patches that add support for
AArch64, the new 64bit execution state of the ARMv8 Architecture. The
patches add support for LP64 programming model.

The patch adds:
* "arch-aarch64" to the architecture directories.
* "arch-aarch64/include" - headers used by libc
* "arch-aarch64/bionic":
    - crtbegin, crtend support;
    - aarch64 specific syscall stubs;
    - setjmp, clone, vfork assembly files.

Change-Id: If72b859f81928d03ad05d4ccfcb54c2f5dbf99a5
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2013-12-16 17:00:22 -08:00
Elliott Hughes
601aef388c am bf5d3929: am fa604740: am db718023: Merge "AArch64: Add support for AArch64 atomic operations"
* commit 'bf5d39296fca2a389f838d5b85fbfc7f19b76df3':
  AArch64: Add support for AArch64 atomic operations
2013-12-16 23:27:46 +00:00
Elliott Hughes
43f135abeb am 334e83e6: am 07fa38da: am 3937d415: Merge "Fix typo."
* commit '334e83e6b47ef4e0f36d4cd99a2269c3c4ae4f76':
  Fix typo.
2013-12-16 23:27:45 +00:00
Serban Constantinescu
1924a5c92e AArch64: Add support for AArch64 atomic operations
This patch adds support for AArch64 atomic operations. Some
of the stubs use the lightweight store/load exclusive.

Change-Id: Iaf704d048b2dc15bf08cf8e4f0c3ea9f2052fe13
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2013-12-16 13:09:33 -08:00
Elliott Hughes
4c186ffb83 Fix typo.
Change-Id: I85157a6b2056b6c17cae193200960b8cae3cb3b3
2013-12-16 13:02:49 -08:00
Elliott Hughes
087333c1cc am b31b775d: am e8101372: am 341b55a1: Merge "Clean up the pthread-only atomic stuff a little."
* commit 'b31b775dfee3730703ec58fcbbbaafae480399ff':
  Clean up the pthread-only atomic stuff a little.
2013-12-16 18:34:47 +00:00
Elliott Hughes
2b333b97a2 Clean up the pthread-only atomic stuff a little.
It looks like we can probably just use the generic GCC stuff instead;
the generated code looks pretty similar. We should come back to that.

These routines are only used by the pthread implementation, and
__bionic_atomic_inc isn't used, so we can remove it.

Change-Id: I8b5b8cb30a1b159f0e85c3675aee06ddef39b429
2013-12-16 10:18:11 -08:00
Elliott Hughes
5bcf426ab1 am 56f7c97e: am 6d4e8c1e: am 003be710: Merge "Clean up some ARMv4/ARMv5 cruft."
* commit '56f7c97e07d1b12a3fd5b22bfadec33afa254caa':
  Clean up some ARMv4/ARMv5 cruft.
2013-12-14 00:02:22 +00:00
Elliott Hughes
c54ca40aef Clean up some ARMv4/ARMv5 cruft.
Change-Id: I29e836fea4b53901e29f96c6888869c35f6726be
2013-12-13 14:02:30 -08:00
Elliott Hughes
f1e05aa736 am b77ef8dc: am 664b1d46: am 8623bf7b: Merge "Make <sys/param.h> more glibc-like."
* commit 'b77ef8dc811c146c3e9b5b9488ea0f0f91b72d1d':
  Make <sys/param.h> more glibc-like.
2013-12-12 23:58:39 +00:00
Christopher Ferris
9bed351f79 am 64edf779: am 7dfd8ae1: am 513d2770: Merge "Add ioprio.h."
* commit '64edf779d79fd81a39ee5e0327f585b37cd828f2':
  Add ioprio.h.
2013-12-12 23:51:17 +00:00
Elliott Hughes
8623bf7b4d Merge "Make <sys/param.h> more glibc-like." 2013-12-12 23:38:25 +00:00
Elliott Hughes
c2f082f655 Make <sys/param.h> more glibc-like.
In particular, add MAX and MIN, needed by elfutils.

Bug: 11864683
Change-Id: I1b876732cdf68cdf5b930319e5ef5b5647586718
2013-12-12 15:31:35 -08:00
Christopher Ferris
802a0a7285 Add ioprio.h.
Change-Id: I153d05c5b6e9d640e319d65acb48b9cb12b6dafb
2013-12-12 15:23:22 -08:00
Elliott Hughes
7b6d74f1a9 am 8d290516: am 2894204d: am 5aad083f: Merge "PTHREAD_KEYS_MAX cleanup."
* commit '8d290516620b6ccd9c86fa5d4ad76049e7ea2c04':
  PTHREAD_KEYS_MAX cleanup.
2013-12-12 21:08:02 +00:00
Elliott Hughes
1887621de8 PTHREAD_KEYS_MAX cleanup.
I fixed this bug a while back, but didn't remove it from the list,
could have added a better test, and could have written clearer code
that didn't require a comment.

Change-Id: Iebdf0f9a54537a7d5cbca254a5967b1543061f3d
2013-12-12 12:51:08 -08:00
Elliott Hughes
e2d10b2a32 am 19e845ec: am 1336cd6d: am 38fcbbb3: Merge "AArch64: Fix mmap64() definition for AArch64, X86_64"
* commit '19e845ec73dc2cdb4f2ca11cd6dd56a0c6c0284a':
  AArch64: Fix mmap64() definition for AArch64, X86_64
2013-12-12 19:12:16 +00:00
Serban Constantinescu
ed76a9361c AArch64: Fix mmap64() definition for AArch64, X86_64
For 64bit Architectures mmap() is equivalent to mmap64(). This patch
maps mmap64() to mmap() in a similar way to other syscalls that differ
based on the size of off_t and off64_t

Change-Id: If21b21ef71120bad23d9a608d02d4a7de5220a87
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
2013-12-12 10:41:52 -08:00
Elliott Hughes
034c084e81 am 7105f406: am 5362e8d2: am 7bd08153: Merge "Remove harmful attempts to be helpful in pthread_mutex functions."
* commit '7105f40649310177ceef1028a39e428d7cf7a71a':
  Remove harmful attempts to be helpful in pthread_mutex functions.
2013-12-11 23:59:42 +00:00
Elliott Hughes
1a6aea8a05 am fcee65c4: am 200fcb26: am 73ef27cd: Merge "Clarify a comment."
* commit 'fcee65c4c46481eb953bb3b3502a85a369c29fb4':
  Clarify a comment.
2013-12-11 23:05:01 +00:00