OSDN Git Service

android-x86/bionic.git
10 years agoUse C99 structure initializer designator style.
Elliott Hughes [Tue, 8 Oct 2013 16:39:52 +0000 (09:39 -0700)]
Use C99 structure initializer designator style.

clang warns about using the GCC style of designator.

Change-Id: I86ec79f06c8774618082859f48d7d1f576520e32

10 years agoMerge "x86_64 linker."
Elliott Hughes [Tue, 8 Oct 2013 16:59:16 +0000 (16:59 +0000)]
Merge "x86_64 linker."

10 years agox86_64 linker.
Elliott Hughes [Sat, 5 Oct 2013 00:01:33 +0000 (17:01 -0700)]
x86_64 linker.

Based on I8dc3e2cb596f75dc58ae82e4dc58f8c177dd3323 by
Pavel Chupin <pavel.v.chupin@intel.com>.

Change-Id: Icd582d277cbe273477b450f2848343d72c86ec9f

10 years agoMerge "Refactor the syscall generation script."
Elliott Hughes [Tue, 8 Oct 2013 16:53:02 +0000 (16:53 +0000)]
Merge "Refactor the syscall generation script."

10 years agoMerge "Fix Clang warning since KernelArgumentBlock is actually a class."
Elliott Hughes [Tue, 8 Oct 2013 16:12:53 +0000 (16:12 +0000)]
Merge "Fix Clang warning since KernelArgumentBlock is actually a class."

10 years agoFix Clang warning since KernelArgumentBlock is actually a class.
Stephen Hines [Tue, 8 Oct 2013 07:05:44 +0000 (00:05 -0700)]
Fix Clang warning since KernelArgumentBlock is actually a class.

Change-Id: Id72868d80feffbbc5f7d1e43beaed5d4e4d95f52

10 years agoRefactor the syscall generation script.
Elliott Hughes [Tue, 8 Oct 2013 06:53:13 +0000 (23:53 -0700)]
Refactor the syscall generation script.

Primarily so that the new x86_64 alias functionality is now available for
all architectures.

Change-Id: I9fde59093a1d08de98923f121a6e3d05ec5801d2

10 years agoMerge "Add an optional alias list to SYSCALLS.TXT"
Elliott Hughes [Tue, 8 Oct 2013 06:03:01 +0000 (06:03 +0000)]
Merge "Add an optional alias list to SYSCALLS.TXT"

10 years agoMerge "libc: fix __cxa_atexit implicit declaration"
Elliott Hughes [Mon, 7 Oct 2013 18:33:51 +0000 (18:33 +0000)]
Merge "libc: fix __cxa_atexit implicit declaration"

10 years agolibc: fix __cxa_atexit implicit declaration
synergydev [Mon, 7 Oct 2013 08:13:11 +0000 (01:13 -0700)]
libc: fix __cxa_atexit implicit declaration

Change-Id: Iacad18b332a717e4485c83df4bd42a850ff7699f

10 years agoMerge "Clean up the x86 and x86_64 _exit_with_stack_teardown implementations."
Elliott Hughes [Mon, 7 Oct 2013 17:49:18 +0000 (17:49 +0000)]
Merge "Clean up the x86 and x86_64 _exit_with_stack_teardown implementations."

10 years agoAdd an optional alias list to SYSCALLS.TXT
H.J. Lu [Fri, 4 Oct 2013 17:03:17 +0000 (10:03 -0700)]
Add an optional alias list to SYSCALLS.TXT

This patch adds an optional alias list to SYSCALLS.TXT.  It is used to
create aliases for a syscall.  For x86-64, lseek64 is an alias for lseek.

Change-Id: Icb11fd2bb461ea4f5f0a26bfc585471d7d7cc468
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Don't define the meaningless SOFTFLOAT for x86."
Elliott Hughes [Mon, 7 Oct 2013 17:27:17 +0000 (17:27 +0000)]
Merge "Don't define the meaningless SOFTFLOAT for x86."

10 years agoClean up the x86 and x86_64 _exit_with_stack_teardown implementations.
Elliott Hughes [Mon, 7 Oct 2013 17:20:24 +0000 (10:20 -0700)]
Clean up the x86 and x86_64 _exit_with_stack_teardown implementations.

Change-Id: I4bcbbc53893612bd94643ef07722becb00f91792

10 years agoDon't define the meaningless SOFTFLOAT for x86.
Elliott Hughes [Mon, 7 Oct 2013 16:53:44 +0000 (09:53 -0700)]
Don't define the meaningless SOFTFLOAT for x86.

Change-Id: I9f932ad5d9f731a0de18efb881d02cedf9fcbede

10 years agoMerge "Fix MIPS build."
Elliott Hughes [Mon, 7 Oct 2013 05:32:56 +0000 (05:32 +0000)]
Merge "Fix MIPS build."

10 years agoFix MIPS build.
Elliott Hughes [Mon, 7 Oct 2013 05:29:07 +0000 (22:29 -0700)]
Fix MIPS build.

Although 'register' is deprecated, we need to use v1, and there's
no way to do that through register constraints on the assembler
fragment itself.

Change-Id: Ib5b12c4c3652513d10cc61d4a4b11314ece25663

10 years agoMerge "libc: Remove deprecated register"
Elliott Hughes [Mon, 7 Oct 2013 04:43:56 +0000 (04:43 +0000)]
Merge "libc: Remove deprecated register"

10 years agoMerge "Upgrade to tzdata2013g."
Elliott Hughes [Mon, 7 Oct 2013 02:57:29 +0000 (02:57 +0000)]
Merge "Upgrade to tzdata2013g."

10 years agolibc: Remove deprecated register
synergydev [Sun, 6 Oct 2013 19:57:51 +0000 (12:57 -0700)]
libc: Remove deprecated register

In c++11, register has been deprecated, and
libc is now built as gnu++11

From the documentation:
A register specifier is a hint to the implementation
that the variable so declared will be heavily used.
[ Note: The hint can be ignored and in most implementations
it will be ignored if the address of the variable is taken.
This use is deprecated (see D.2)

Change-Id: I459dc3f5f9de63fc09eeda3bc6700f31bdf20f6f

10 years agoUpgrade to tzdata2013g.
Elliott Hughes [Sun, 6 Oct 2013 18:35:34 +0000 (11:35 -0700)]
Upgrade to tzdata2013g.

From the release notes:

  Changes affecting current and near-future time stamps

    Morocco now observes DST from the last Sunday in March to the last
    Sunday in October, not April to September respectively.  (Thanks
    to Steffen Thorsen.)

Change-Id: I9a657a1b819ce17bb424474d4bcdae093f4c4dca

10 years agoMerge "Add arch-x86_64/include/machine."
Elliott Hughes [Fri, 4 Oct 2013 23:17:30 +0000 (23:17 +0000)]
Merge "Add arch-x86_64/include/machine."

10 years agoAdd arch-x86_64/include/machine.
Elliott Hughes [Fri, 4 Oct 2013 22:59:19 +0000 (15:59 -0700)]
Add arch-x86_64/include/machine.

This is basically the other half of I5de76f6c46ac87779f207d568a86bb453e2414de
from Pavel Chupin <pavel.v.chupin@intel.com>, but taking the exact upstream
_types.h instead of the modified version. (I was confused when I suggested
otherwise.)

I've also cleaned up the internal_types.h situation; we weren't gaining
anything from these empty files, and there is no upstream internal_types.h
for x86_64.

Change-Id: I802a9a6a8df1c979e820659212c75a47c2ef392e

10 years agoMerge "Add arch-x86_64/bionic."
Elliott Hughes [Fri, 4 Oct 2013 22:02:06 +0000 (22:02 +0000)]
Merge "Add arch-x86_64/bionic."

10 years agoAdd arch-x86_64/bionic.
Elliott Hughes [Fri, 4 Oct 2013 21:55:30 +0000 (14:55 -0700)]
Add arch-x86_64/bionic.

This is basically half of I5de76f6c46ac87779f207d568a86bb453e2414de from
Pavel Chupin <pavel.v.chupin@intel.com>, but with the stock upstream
setjump/sigsetjmp and H.J. Lu's suggested changes to __rt_sigreturn.

Change-Id: I8167ec228faeb2065391e5bec0413cca662f3d33

10 years agoMerge "Make error messages even better!"
Nick Kralevich [Fri, 4 Oct 2013 18:48:47 +0000 (18:48 +0000)]
Merge "Make error messages even better!"

10 years agoMake error messages even better!
Nick Kralevich [Fri, 4 Oct 2013 16:45:24 +0000 (09:45 -0700)]
Make error messages even better!

Change-Id: I72bd1eb1d526dc59833e5bc3c636171f7f9545af

10 years agoMerge "x86_64: Remove lseek64 for x86_64 for a while"
Elliott Hughes [Fri, 4 Oct 2013 18:30:55 +0000 (18:30 +0000)]
Merge "x86_64: Remove lseek64 for x86_64 for a while"

10 years agox86_64: Remove lseek64 for x86_64 for a while
Pavel Chupin [Fri, 20 Sep 2013 14:46:42 +0000 (18:46 +0400)]
x86_64: Remove lseek64 for x86_64 for a while

Just to keep x86_64 libc buildable

Change-Id: I6e69abe2b699bc4ac12e41178ee080df5dac47b7
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Remove useless x86 fallbacks."
Elliott Hughes [Fri, 4 Oct 2013 18:05:48 +0000 (18:05 +0000)]
Merge "Remove useless x86 fallbacks."

10 years agoMerge "Fixed ASM_ALIGN macro"
Elliott Hughes [Fri, 4 Oct 2013 16:25:47 +0000 (16:25 +0000)]
Merge "Fixed ASM_ALIGN macro"

10 years agoMerge "FORTIFY_SOURCE: emphasize prevention in error messages."
Nick Kralevich [Fri, 4 Oct 2013 16:20:20 +0000 (16:20 +0000)]
Merge "FORTIFY_SOURCE: emphasize prevention in error messages."

10 years agoFORTIFY_SOURCE: emphasize prevention in error messages.
Nick Kralevich [Fri, 4 Oct 2013 15:57:17 +0000 (08:57 -0700)]
FORTIFY_SOURCE: emphasize prevention in error messages.

FORTIFY_SOURCE prevents buffer overflows from occurring.
However, the error message often implies that we only
detect it, not prevent it.

Bring more clarity to the error messages by emphasizing
prevention over detection.

Change-Id: I5f3e1478673bdfc589e6cc4199fce8e52e197a24

10 years agoFixed ASM_ALIGN macro
Pavel Chupin [Fri, 4 Oct 2013 07:08:56 +0000 (11:08 +0400)]
Fixed ASM_ALIGN macro

Got it all wrong on first patch. Somehow that didn't affect system
build, neither arm nor x86... something to think about.

Change-Id: I45416d843aad44af62841c6f6ab607ccf3f012ea
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoRemove useless x86 fallbacks.
Elliott Hughes [Fri, 4 Oct 2013 06:30:33 +0000 (23:30 -0700)]
Remove useless x86 fallbacks.

The NDK ABI requires that you support SSE2, and the build system won't let you
build with ARCH_X86_HAVE_SSE2 set to false. So let's stop pretending this
constant is actually a variable, and let's remove the corresponding dead code.

Also, the USE_SSE2 and USE_SSE3 macros are unused, so let's not bother
setting them.

Change-Id: I40b501d998530d22518ce1c4d14575513a8125bb

10 years agoMerge "x86_64: Fix get_tls and statvfs"
Elliott Hughes [Fri, 4 Oct 2013 00:34:49 +0000 (00:34 +0000)]
Merge "x86_64: Fix get_tls and statvfs"

10 years agox86_64: Fix get_tls and statvfs
Pavel Chupin [Fri, 20 Sep 2013 14:46:42 +0000 (18:46 +0400)]
x86_64: Fix get_tls and statvfs

* bionic_tls.h - Add x86_64 version of get_tls macro;
* statvfs.h - 64-bit kernels don't have __statfs64/__fstatfs64, applying
workaround;

Change-Id: I20d7ddad74c7b7243866373d0142da6627c08280
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Move common arch-* code to arch-common directory"
Elliott Hughes [Thu, 3 Oct 2013 23:17:58 +0000 (23:17 +0000)]
Merge "Move common arch-* code to arch-common directory"

10 years agoMerge "Don't export unnecessary symbol."
Nick Kralevich [Thu, 3 Oct 2013 22:52:02 +0000 (22:52 +0000)]
Merge "Don't export unnecessary symbol."

10 years agoMerge "Check memory size on FD_* functions"
Nick Kralevich [Thu, 3 Oct 2013 22:46:49 +0000 (22:46 +0000)]
Merge "Check memory size on FD_* functions"

10 years agoCheck memory size on FD_* functions
Nick Kralevich [Thu, 3 Oct 2013 21:08:39 +0000 (14:08 -0700)]
Check memory size on FD_* functions

Make sure the buffer we're dealing with has enough room.
Might as well check for memory issues while we're here,
even though I don't imagine they'll happen in practice.

Change-Id: I0ae1f0f06aca9ceb91e58c70183bb14e275b92b5

10 years agoDon't export unnecessary symbol.
Nick Kralevich [Thu, 3 Oct 2013 21:59:05 +0000 (14:59 -0700)]
Don't export unnecessary symbol.

Change-Id: I8b1d75a08476c41dd8e3f09fc93a3df617928f88

10 years agoMerge "Add dependencies on included makefiles."
Christopher Ferris [Thu, 3 Oct 2013 21:35:36 +0000 (21:35 +0000)]
Merge "Add dependencies on included makefiles."

10 years agoAdd dependencies on included makefiles.
Christopher Ferris [Thu, 3 Oct 2013 20:26:22 +0000 (13:26 -0700)]
Add dependencies on included makefiles.

Bug: 11050594

Merge from internal master.

(cherry-picked from f389284e86bbcbdb257d7388a17fde007113b0d6)

Change-Id: I2b3e38329a09d26c16870906f9ed1257e2a9dbc8

10 years agoMerge "Remove dead files."
Christopher Ferris [Thu, 3 Oct 2013 19:53:21 +0000 (19:53 +0000)]
Merge "Remove dead files."

10 years agoRemove dead files.
Christopher Ferris [Thu, 3 Oct 2013 18:15:09 +0000 (11:15 -0700)]
Remove dead files.

memcpy.a15.S/strcmp.a15.S files were submitted by ARM for use as the basis
for the memcpy/strcmp implementations in cortex-a15.

memset.S was moved in to the generic directory.

NOTE: memcpy.a9.S was submitted by Linaro to be the basis for the memcpy
for cortex-a9/cortex-a15 but has not been incorporated yet.

Bug: 10971279

Merge from internal master.

(cherry-picked from 48fc3e8b9fe7241ecf8ad61248247986742f05b6)

Change-Id: I8f9297578990d517f004e4e8840e2b2cbd5a47d8

10 years agoMove common arch-* code to arch-common directory
Pavel Chupin [Wed, 2 Oct 2013 12:38:05 +0000 (16:38 +0400)]
Move common arch-* code to arch-common directory

Will be helpful on adding x86_64

Change-Id: I96cf6fc7912c02f289c75f07ae0079c32d69173f
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Remove the __ARM_FEATURE_DSP check."
Christopher Ferris [Thu, 3 Oct 2013 06:22:27 +0000 (06:22 +0000)]
Merge "Remove the __ARM_FEATURE_DSP check."

10 years agoRemove the __ARM_FEATURE_DSP check.
Christopher Ferris [Thu, 3 Oct 2013 00:03:44 +0000 (17:03 -0700)]
Remove the __ARM_FEATURE_DSP check.

The check for __ARM_FEATURE_DSP being defined is pointless since it
is always defined.

Bug: 10971279

Merge from internal master.

(cherry-picked from d2642fa70cfbd77286514e1123fcd280d7f7047f)

Change-Id: If23ab3271f4da0c38cd531ffdc9a7e5eed6ec5dc

10 years agoMerge "Fix 32-bit issues in tests, and add a trivial test for the FD_* macros."
Elliott Hughes [Thu, 3 Oct 2013 04:00:30 +0000 (04:00 +0000)]
Merge "Fix 32-bit issues in tests, and add a trivial test for the FD_* macros."

10 years agoMerge "Fix the x86_64 fenv.h."
Elliott Hughes [Thu, 3 Oct 2013 03:48:19 +0000 (03:48 +0000)]
Merge "Fix the x86_64 fenv.h."

10 years agoFix the x86_64 fenv.h.
Elliott Hughes [Thu, 3 Oct 2013 00:02:58 +0000 (17:02 -0700)]
Fix the x86_64 fenv.h.

We should clean all the fenv.h files up, but not now. I've raised
bug 11050744 as a reminder.

Change-Id: I640c15b0f0477ec1a7891c031860404875bbe4b5

10 years agoMerge "libc: don't export unnecessary symbols"
Nick Kralevich [Wed, 2 Oct 2013 23:59:23 +0000 (23:59 +0000)]
Merge "libc: don't export unnecessary symbols"

10 years agoFix 32-bit issues in tests, and add a trivial test for the FD_* macros.
Elliott Hughes [Wed, 2 Oct 2013 23:59:05 +0000 (16:59 -0700)]
Fix 32-bit issues in tests, and add a trivial test for the FD_* macros.

Change-Id: Ia3f21ce1f0ed9236527fe44d36ccb7de6bf63113

10 years agolibc: don't export unnecessary symbols
Nick Kralevich [Wed, 2 Oct 2013 23:54:58 +0000 (16:54 -0700)]
libc: don't export unnecessary symbols

Symbols associated with the internal implementation of memcpy
like routines should be private.

Change-Id: I2b1d1f59006395c29d518c153928437b08f93d16

10 years agoMerge "FORTIFY_SOURCE: Add __FD_* checks"
Nick Kralevich [Wed, 2 Oct 2013 23:26:50 +0000 (23:26 +0000)]
Merge "FORTIFY_SOURCE: Add __FD_* checks"

10 years agoFORTIFY_SOURCE: Add __FD_* checks
Nick Kralevich [Wed, 2 Oct 2013 23:11:30 +0000 (16:11 -0700)]
FORTIFY_SOURCE: Add __FD_* checks

Add FORTIFY_SOURCE checks for the following macros:

* FD_CLR
* FD_ISSET
* FD_SET

Bug: 11047121
Change-Id: I3c5952136aec9eff3288b91b1318677ff971525c

10 years agoMerge "Use gnu++11 and gnu99 explicitly for C++/C files."
Stephen Hines [Wed, 2 Oct 2013 22:18:25 +0000 (22:18 +0000)]
Merge "Use gnu++11 and gnu99 explicitly for C++/C files."

10 years agoMerge "Use alloc_size attribute on *alloc functions"
Nick Kralevich [Wed, 2 Oct 2013 21:31:42 +0000 (21:31 +0000)]
Merge "Use alloc_size attribute on *alloc functions"

10 years agoUse alloc_size attribute on *alloc functions
Nick Kralevich [Wed, 2 Oct 2013 21:14:40 +0000 (14:14 -0700)]
Use alloc_size attribute on *alloc functions

malloc and family were not declared with __attribute__((alloc_size)).
This was (sometimes) preventing FORTIFY_SOURCE related functions
from knowing the size of the buffer it's dealing with, inhibiting
FORTIFY_SOURCE protections.

Add __attribute__((alloc_size))

Information about the alloc_size attribute can be found
at http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

Change-Id: Ia2f0a445f0170a7325f69259b5e7fb35a9f14921

10 years agoUse gnu++11 and gnu99 explicitly for C++/C files.
Stephen Hines [Tue, 1 Oct 2013 00:10:53 +0000 (17:10 -0700)]
Use gnu++11 and gnu99 explicitly for C++/C files.

Clang and gcc default to different standards, so we should be explicit
about the versions we want to compile for.

Change-Id: I65495a2392dd29f36373b94c616c2506173e6033

10 years agoMerge "Remove #define _BITSIZE 32."
Elliott Hughes [Wed, 2 Oct 2013 17:06:44 +0000 (17:06 +0000)]
Merge "Remove #define _BITSIZE 32."

10 years agoMerge "Remove _FORTIFY_SOURCE in implementation files."
Stephen Hines [Wed, 2 Oct 2013 16:30:15 +0000 (16:30 +0000)]
Merge "Remove _FORTIFY_SOURCE in implementation files."

10 years agoMerge "Add simple implementation _Unwind_GetIP() for clang compiles."
Stephen Hines [Wed, 2 Oct 2013 16:29:21 +0000 (16:29 +0000)]
Merge "Add simple implementation _Unwind_GetIP() for clang compiles."

10 years agoRemove #define _BITSIZE 32.
Elliott Hughes [Wed, 2 Oct 2013 16:23:46 +0000 (09:23 -0700)]
Remove #define _BITSIZE 32.

I've no idea what _BITSIZE was supposed to be, glibc doesn't have it,
the BSDs don't have it, and no code is currently using it. But having
it set unconditionally to 32 sounds like a bad idea.

Change-Id: I900235c1489afba891fff0bc3b43e9d593249a4f

10 years agoMerge "The x86_64 kernel headers are the x86 kernel headers."
Elliott Hughes [Wed, 2 Oct 2013 15:52:02 +0000 (15:52 +0000)]
Merge "The x86_64 kernel headers are the x86 kernel headers."

10 years agoMerge "Add missing backslash in MIPS filelist"
Elliott Hughes [Wed, 2 Oct 2013 02:46:11 +0000 (02:46 +0000)]
Merge "Add missing backslash in MIPS filelist"

10 years agoAdd missing backslash in MIPS filelist
Chris Dearman [Wed, 2 Oct 2013 02:11:26 +0000 (19:11 -0700)]
Add missing backslash in MIPS filelist

Change-Id: I993ea7038cd641ea167d974226e2350e49d41c88

10 years agoAdd simple implementation _Unwind_GetIP() for clang compiles.
Stephen Hines [Wed, 2 Oct 2013 01:20:51 +0000 (18:20 -0700)]
Add simple implementation _Unwind_GetIP() for clang compiles.

Clang (prior to 3.4) does not actually provide a declaration (or definition)
of _Unwind_GetIP() for ARM. We can work around this by writing our own
basic implementation using the available primitive operations.

Change-Id: If6c66846952d8545849ad32d2b55daa4599cfe2c

10 years agoThe x86_64 kernel headers are the x86 kernel headers.
Elliott Hughes [Wed, 2 Oct 2013 01:03:23 +0000 (18:03 -0700)]
The x86_64 kernel headers are the x86 kernel headers.

Change-Id: I8763aee7043800eb23a720914b57396e79fa812e

10 years agoMerge "Fix libm build for x86_64."
Elliott Hughes [Wed, 2 Oct 2013 01:00:25 +0000 (01:00 +0000)]
Merge "Fix libm build for x86_64."

10 years agoFix libm build for x86_64.
Elliott Hughes [Wed, 2 Oct 2013 00:57:19 +0000 (17:57 -0700)]
Fix libm build for x86_64.

Change-Id: If89da2d5c3d9a88f78ffd8b260ad0f2fd391c608

10 years agoMerge "x86_64: libm fixes"
Elliott Hughes [Wed, 2 Oct 2013 00:32:42 +0000 (00:32 +0000)]
Merge "x86_64: libm fixes"

10 years agoMerge "Remove more assumptions that pointers are 32-bit."
Elliott Hughes [Wed, 2 Oct 2013 00:30:51 +0000 (00:30 +0000)]
Merge "Remove more assumptions that pointers are 32-bit."

10 years agoRemove more assumptions that pointers are 32-bit.
Elliott Hughes [Wed, 2 Oct 2013 00:25:28 +0000 (17:25 -0700)]
Remove more assumptions that pointers are 32-bit.

Change-Id: I2157e2fc4db7692b746c697982c3d028a056462a

10 years agoMerge "x86_64: Update Makefiles for x86_64 targets and add symlinks"
Elliott Hughes [Tue, 1 Oct 2013 22:37:10 +0000 (22:37 +0000)]
Merge "x86_64: Update Makefiles for x86_64 targets and add symlinks"

10 years agox86_64: Update Makefiles for x86_64 targets and add symlinks
Pavel Chupin [Tue, 18 Dec 2012 13:30:02 +0000 (17:30 +0400)]
x86_64: Update Makefiles for x86_64 targets and add symlinks

Use basic .c versions of all functions for x86_64 until they are
manually optimized and .s versions released.

Change-Id: I59bba08931e894822db485c8803c2665c226234a
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoRemove _FORTIFY_SOURCE in implementation files.
Stephen Hines [Tue, 1 Oct 2013 22:02:07 +0000 (15:02 -0700)]
Remove _FORTIFY_SOURCE in implementation files.

This was causing conflicting declarations for the library definitions of
common functions like sprintf(), snprintf(), and strchr().

Change-Id: I5daaa8a58183aa0d4d0fae8a7cb799671810f576

10 years agoMerge "x86_64: add new __NR_arch_prctl syscall"
Elliott Hughes [Tue, 1 Oct 2013 20:58:41 +0000 (20:58 +0000)]
Merge "x86_64: add new __NR_arch_prctl syscall"

10 years agox86_64: add new __NR_arch_prctl syscall
Pavel Chupin [Wed, 12 Dec 2012 09:18:50 +0000 (13:18 +0400)]
x86_64: add new __NR_arch_prctl syscall

This is used to set/get TLS on x86_64. There's no public declaration
of this because it's not meant to be used outside the C library, like
glibc (though we don't currently have any visibility controls to ensure
this).

Change-Id: I5fc0a5e3ffc3f4cd597d92ee685ab19568ea18f7
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Regenerate the system call stubs (to get x86_64)."
Elliott Hughes [Tue, 1 Oct 2013 20:53:50 +0000 (20:53 +0000)]
Merge "Regenerate the system call stubs (to get x86_64)."

10 years agoRegenerate the system call stubs (to get x86_64).
Elliott Hughes [Tue, 1 Oct 2013 20:29:43 +0000 (13:29 -0700)]
Regenerate the system call stubs (to get x86_64).

This touches the x86 stubs too because arm, x86, and x86_64 now
all share the same header (at a source level), which causes a
reordering of the #include lines.

Change-Id: If9a1e2b2718bd41d8399fea748bce672c513ef84

10 years agoMerge "x86_64: Add x86_64 syscalls and tune gen scripts for x86_64"
Elliott Hughes [Tue, 1 Oct 2013 20:27:48 +0000 (20:27 +0000)]
Merge "x86_64: Add x86_64 syscalls and tune gen scripts for x86_64"

10 years agox86_64: Add x86_64 syscalls and tune gen scripts for x86_64
Pavel Chupin [Wed, 12 Dec 2012 09:11:48 +0000 (13:11 +0400)]
x86_64: Add x86_64 syscalls and tune gen scripts for x86_64

* Tune syscall stubs generator for 4th target: x86_64
* Update SYSCALLS.TXT with x86_64 syscalls:
 - Most of the x86 syscalls are equally supported
 - *32 syscalls are not supported on 64-bit
 - *64 syscalls are replaced accordingly without 64 suffix
 - Some syscalls are not supported, replaced with x86_64 analog

Syscalls are regenerated as separate patch for review convenience.

Change-Id: I4ea2e0f13759b0aa61f05208ca68da8d6bc7c048
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agox86_64: libm fixes
Pavel Chupin [Fri, 20 Sep 2013 15:09:55 +0000 (19:09 +0400)]
x86_64: libm fixes

* Makefile update for x86_64 target
* amd64 arch files

Change-Id: I8f17e3338bffd89a3086fbddd1e91bb4619eac1b
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
10 years agoMerge "Clean up some comments."
Elliott Hughes [Tue, 1 Oct 2013 18:10:54 +0000 (18:10 +0000)]
Merge "Clean up some comments."

10 years agoClean up some comments.
Elliott Hughes [Tue, 1 Oct 2013 18:06:56 +0000 (11:06 -0700)]
Clean up some comments.

Copyright headers shouldn't contain the filename (and especially
shouldn't contain a different file's filename).

Change-Id: I82690a3bf371265402bc16f5d2fbb9299c3a1926

10 years agoMerge "Better statfs/fstatfs glibc compatibility."
Elliott Hughes [Tue, 1 Oct 2013 15:30:40 +0000 (15:30 +0000)]
Merge "Better statfs/fstatfs glibc compatibility."

10 years agoMerge "Remove 32-bit assumptions from the ELF code."
Elliott Hughes [Tue, 1 Oct 2013 15:23:44 +0000 (15:23 +0000)]
Merge "Remove 32-bit assumptions from the ELF code."

10 years agoBetter statfs/fstatfs glibc compatibility.
Elliott Hughes [Tue, 1 Oct 2013 04:57:07 +0000 (21:57 -0700)]
Better statfs/fstatfs glibc compatibility.

Change-Id: I069d169c96cd71b75a045ec911fb4bd484c6b2c9

10 years agoMerge "Fix x86 build."
Elliott Hughes [Tue, 1 Oct 2013 02:23:02 +0000 (02:23 +0000)]
Merge "Fix x86 build."

10 years agoFix x86 build.
Elliott Hughes [Tue, 1 Oct 2013 02:20:02 +0000 (19:20 -0700)]
Fix x86 build.

Change-Id: I1f2d8189bec3d0e25d21ca7d7bd73fd02f8678e2

10 years agoRemove 32-bit assumptions from the ELF code.
Elliott Hughes [Tue, 1 Oct 2013 01:43:46 +0000 (18:43 -0700)]
Remove 32-bit assumptions from the ELF code.

Change-Id: I2c1f3d34c33685799aade8866eec44479ff9f963

10 years agoMerge "Add x86_64 to the bionic headers."
Elliott Hughes [Tue, 1 Oct 2013 01:42:43 +0000 (01:42 +0000)]
Merge "Add x86_64 to the bionic headers."

10 years agoAdd x86_64 to the bionic headers.
Elliott Hughes [Tue, 1 Oct 2013 00:41:08 +0000 (17:41 -0700)]
Add x86_64 to the bionic headers.

Manual changes:

  cpp.py: cope with macros that refer to other macros.

  defaults.py: x86 no longer always implies __i386__; use __i386__ to replace
  the kernel CONFIG_X86_32 flag.

  asm/page.h: the upstream page.h isn't a uapi header and no longer includes
  the stuff we were using it for. Let's just have our own static file, since
  it's the same for all our architectures (both 32- and 64-bit).

  sys/select.h: we used to use the various FD_SET-related macros from the
  kernel header files, but they've gone. Adjust by adding trivial equivalent
  definitions.

Automated changes:

  libc/kernel/arch-x86, libc/kernel/common: regenerated from
  external/kernel-headers.

Change-Id: I84fc0ed52dc742e043b4ae300fd3b58ee99b7fcd

10 years agoMerge "Fix inttypes.h and stdint.h for 64-bit (and C++11)."
Elliott Hughes [Mon, 30 Sep 2013 21:53:05 +0000 (21:53 +0000)]
Merge "Fix inttypes.h and stdint.h for 64-bit (and C++11)."

10 years agoFix inttypes.h and stdint.h for 64-bit (and C++11).
Elliott Hughes [Mon, 30 Sep 2013 21:46:47 +0000 (14:46 -0700)]
Fix inttypes.h and stdint.h for 64-bit (and C++11).

Change-Id: I394630348413c9aafcac137ce1ca5f0a93d9ab6f

10 years agoMerge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Andro...
Elliott Hughes [Fri, 27 Sep 2013 22:38:45 +0000 (22:38 +0000)]
Merge "Upgrade to tzcode2013f plus Android modifications (from tzcode2013d plus Android modifications)."

10 years agoMerge "Fix unnecessary call to __strncpy_chk2"
Nick Kralevich [Fri, 27 Sep 2013 22:13:19 +0000 (22:13 +0000)]
Merge "Fix unnecessary call to __strncpy_chk2"

10 years agoFix unnecessary call to __strncpy_chk2
Nick Kralevich [Fri, 27 Sep 2013 20:21:24 +0000 (13:21 -0700)]
Fix unnecessary call to __strncpy_chk2

If "n" is smaller than the size of "src", then we'll
never read off the end of src. It makes no sense to call
__strncpy_chk2 in those circumstances.

For example, consider the following code:

int main() {
  char src[10];
  char dst[5];
  memcpy(src, "0123456789", sizeof(src));
  strncpy(dst, src, sizeof(dst));
  dst[4] = '\0';
  printf("%s\n", dst);
  return 0;
}

In this code, it's clear that the strncpy will never read off
the end of src.

Change-Id: I9cf58857a0c5216b4576d21d3c1625e2913ccc03