summaryrefslogtreecommitdiffstats
path: root/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix __errno for LP64 and clean up __get_tls.Elliott Hughes2013-10-0913-102/+55
| | | | | | | | | | | If __get_tls has the right type, a lot of confusing casting can disappear. It was probably a mistake that __get_tls was exposed as a function for mips and x86 (but not arm), so let's (a) ensure that the __get_tls function always matches the macro, (b) that we have the function for arm too, and (c) that we don't have the function for any 64-bit architecture. Change-Id: Ie9cb989b66e2006524ad7733eb6e1a65055463be
* Fix 32-bit build.Elliott Hughes2013-10-081-0/+2
| | | | | | | libc/tzcode/localtime.c: In function 'differ_by_repeat': libc/tzcode/localtime.c:338:2: error: comparison is always false due to limited range of data type [-Werror=type-limits] Change-Id: Ic84be6391a66e9d50ed98f41d865387c77a60ffa
* Merge "Fix malloc debugging for LP64."Elliott Hughes2013-10-092-22/+23
|\
| * Fix malloc debugging for LP64.Elliott Hughes2013-10-082-22/+23
| | | | | | | | Change-Id: Idd0b239f5c66d45de315d556271a5d13b8eb907c
* | Merge "Don't allow int<->pointer conversions."Elliott Hughes2013-10-091-1/+7
|\ \
| * | Don't allow int<->pointer conversions.Elliott Hughes2013-10-081-1/+7
| |/ | | | | | | | | | | | | | | Normally we don't have -Werror for upstream code, but for those warnings that probably point to 32-bit assumptions about pointers, we want those warnings to always be errors. Change-Id: Ibece9caf09b2f7989ca600ef448d07868669a8fb
* | Fix bionic's built-in stack trace dumping for LP64.Elliott Hughes2013-10-081-6/+14
|/ | | | Change-Id: I967c5789d7bb2d3d248d94d81a40d5ec4e1bf26d
* Fix the ALIGN and ALIGNBYTES macros for LP64.Elliott Hughes2013-10-081-2/+7
| | | | Change-Id: I3a361255afce375ab1cefa449721f0aea4d47919
* Merge "pthread_exit should call __NR_exit with status 0."Elliott Hughes2013-10-086-24/+20
|\
| * pthread_exit should call __NR_exit with status 0.Elliott Hughes2013-10-086-24/+20
| | | | | | | | | | | | | | We shouldn't have been passing the bottom 32 bits of the address used for pthread_join to the kernel. Change-Id: I487e5002d60c27adba51173719213abbee0f183f
* | Make logging fall back to /dev/stderr if we're on the host.Elliott Hughes2013-10-081-0/+25
|/ | | | | | Otherwise you get no logging, which sucks. Change-Id: Iea1e8f996461afbb217a55711b7967005c39cfcb
* Refactor the syscall generation script.Elliott Hughes2013-10-071-151/+157
| | | | | | | Primarily so that the new x86_64 alias functionality is now available for all architectures. Change-Id: I9fde59093a1d08de98923f121a6e3d05ec5801d2
* Merge "Add an optional alias list to SYSCALLS.TXT"Elliott Hughes2013-10-084-5/+32
|\
| * Add an optional alias list to SYSCALLS.TXTH.J. Lu2013-10-074-5/+32
| | | | | | | | | | | | | | | | | | 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>
* | libc: fix __cxa_atexit implicit declarationsynergydev2013-10-071-4/+5
| | | | | | | | Change-Id: Iacad18b332a717e4485c83df4bd42a850ff7699f
* | Merge "Clean up the x86 and x86_64 _exit_with_stack_teardown implementations."Elliott Hughes2013-10-073-41/+29
|\ \
| * | Clean up the x86 and x86_64 _exit_with_stack_teardown implementations.Elliott Hughes2013-10-073-41/+29
| |/ | | | | | | Change-Id: I4bcbbc53893612bd94643ef07722becb00f91792
* | Don't define the meaningless SOFTFLOAT for x86.Elliott Hughes2013-10-071-2/+0
|/ | | | Change-Id: I9f932ad5d9f731a0de18efb881d02cedf9fcbede
* Fix MIPS build.Elliott Hughes2013-10-061-1/+1
| | | | | | | | 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
* Merge "libc: Remove deprecated register"Elliott Hughes2013-10-071-4/+4
|\
| * libc: Remove deprecated registersynergydev2013-10-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Upgrade to tzdata2013g.Elliott Hughes2013-10-061-0/+0
|/ | | | | | | | | | | | 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
* Add arch-x86_64/include/machine.Elliott Hughes2013-10-0415-37/+767
| | | | | | | | | | | | | 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
* Merge "Add arch-x86_64/bionic."Elliott Hughes2013-10-0418-11/+866
|\
| * Add arch-x86_64/bionic.Elliott Hughes2013-10-0418-11/+866
| | | | | | | | | | | | | | | | 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
* | Merge "Make error messages even better!"Nick Kralevich2013-10-0430-32/+32
|\ \ | |/ |/|
| * Make error messages even better!Nick Kralevich2013-10-0430-32/+32
| | | | | | | | Change-Id: I72bd1eb1d526dc59833e5bc3c636171f7f9545af
* | x86_64: Remove lseek64 for x86_64 for a whilePavel Chupin2013-10-041-1/+1
| | | | | | | | | | | | | | Just to keep x86_64 libc buildable Change-Id: I6e69abe2b699bc4ac12e41178ee080df5dac47b7 Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | Merge "Remove useless x86 fallbacks."Elliott Hughes2013-10-045-159/+14
|\ \ | |/ |/|
| * Remove useless x86 fallbacks.Elliott Hughes2013-10-035-159/+14
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Fixed ASM_ALIGN macro"Elliott Hughes2013-10-041-2/+2
|\ \
| * | Fixed ASM_ALIGN macroPavel Chupin2013-10-041-2/+2
| |/ | | | | | | | | | | | | | | 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>
* | FORTIFY_SOURCE: emphasize prevention in error messages.Nick Kralevich2013-10-0416-18/+18
|/ | | | | | | | | | | 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
* x86_64: Fix get_tls and statvfsPavel Chupin2013-10-032-1/+14
| | | | | | | | | * 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>
* Merge "Move common arch-* code to arch-common directory"Elliott Hughes2013-10-0312-167/+60
|\
| * Move common arch-* code to arch-common directoryPavel Chupin2013-10-0312-167/+60
| | | | | | | | | | | | | | Will be helpful on adding x86_64 Change-Id: I96cf6fc7912c02f289c75f07ae0079c32d69173f Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
* | Merge "Don't export unnecessary symbol."Nick Kralevich2013-10-031-1/+1
|\ \
| * | Don't export unnecessary symbol.Nick Kralevich2013-10-031-1/+1
| | | | | | | | | | | | Change-Id: I8b1d75a08476c41dd8e3f09fc93a3df617928f88
* | | Merge "Check memory size on FD_* functions"Nick Kralevich2013-10-032-15/+23
|\ \ \
| * | | Check memory size on FD_* functionsNick Kralevich2013-10-032-15/+23
| |/ / | | | | | | | | | | | | | | | | | | | | | 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
* | | Add dependencies on included makefiles.Christopher Ferris2013-10-032-13/+25
|/ / | | | | | | | | | | | | | | | | | | Bug: 11050594 Merge from internal master. (cherry-picked from f389284e86bbcbdb257d7388a17fde007113b0d6) Change-Id: I2b3e38329a09d26c16870906f9ed1257e2a9dbc8
* | Remove dead files.Christopher Ferris2013-10-033-1393/+0
|/ | | | | | | | | | | | | | | | | | 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
* Remove the __ARM_FEATURE_DSP check.Christopher Ferris2013-10-023-33/+0
| | | | | | | | | | | | | 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
* libc: don't export unnecessary symbolsNick Kralevich2013-10-0213-15/+15
| | | | | | | Symbols associated with the internal implementation of memcpy like routines should be private. Change-Id: I2b1d1f59006395c29d518c153928437b08f93d16
* FORTIFY_SOURCE: Add __FD_* checksNick Kralevich2013-10-023-3/+74
| | | | | | | | | | | Add FORTIFY_SOURCE checks for the following macros: * FD_CLR * FD_ISSET * FD_SET Bug: 11047121 Change-Id: I3c5952136aec9eff3288b91b1318677ff971525c
* Merge "Use gnu++11 and gnu99 explicitly for C++/C files."Stephen Hines2013-10-021-7/+33
|\
| * Use gnu++11 and gnu99 explicitly for C++/C files.Stephen Hines2013-10-021-7/+33
| | | | | | | | | | | | | | Clang and gcc default to different standards, so we should be explicit about the versions we want to compile for. Change-Id: I65495a2392dd29f36373b94c616c2506173e6033
* | Use alloc_size attribute on *alloc functionsNick Kralevich2013-10-021-6/+6
|/ | | | | | | | | | | | | | 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
* Merge "Remove #define _BITSIZE 32."Elliott Hughes2013-10-021-2/+0
|\
| * Remove #define _BITSIZE 32.Elliott Hughes2013-10-021-2/+0
| | | | | | | | | | | | | | | | 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