Commit graph

2341 commits

Author SHA1 Message Date
Vitaly Wool
954923858b termios: add tcdrain
Change-Id: I05c0007f7bcc6ef5295c32f86fafbf1ad31e07fa
2012-09-04 14:11:28 +02:00
Ian Rogers
6fe901ef38 Merge "Upgrade to dlmalloc 2.8.6." 2012-08-31 08:42:41 -07:00
Ian Rogers
c6d95add30 Upgrade to dlmalloc 2.8.6.
This fixes a bug and enables the use of MORECORE_CONTIGUOUS.

Change-Id: Ia7c5d32bdc46e99b3ecb92ee94d1f702c4385d5d
2012-08-29 18:18:29 -07:00
Elliott Hughes
8b4e8a937b Merge "Improve the dynamic linker diagnostics." 2012-08-29 13:56:40 -07:00
Nick Kralevich
17d9be8ad7 Merge "disable _FORTIFY_SOURCE under clang" 2012-08-29 13:54:49 -07:00
Elliott Hughes
e9b6fc6f82 Improve the dynamic linker diagnostics.
Lose the pid, only show the name of the function (not its whole signature),
and include the name of the library we failed to load. (I hadn't noticed
that the library name was missing before because in Java we add that into
the UnsatisfiedLinkError detail message.)

The new output looks like this:

  Cannot load library: soinfo_relocate(linker.cpp:968): cannot locate symbol "__libc_malloc_default_dispatch" referenced by "libc_malloc_debug_leak.so"...

Change-Id: I3bb5c9780d9aaf3a9e4418ea55bc98122a81f80f
2012-08-29 13:10:54 -07:00
Elliott Hughes
0d7177c0d4 Merge "Clean up warnings in the malloc_debug_* files." 2012-08-29 13:08:50 -07:00
Nick Kralevich
829c089f83 disable _FORTIFY_SOURCE under clang
Clang and _FORTIFY_SOURCE are just plain incompatible with
each other.  First of all, clang doesn't understand the
__attribute__((gnu_inline)) header. Second of all,
Clang doesn't have support for __builtin_va_arg_pack()
and __builtin_va_arg_pack_len() (see
http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc)

Until we can resolve these issues, don't even try using
_FORTIFY_SOURCE under clang.

Change-Id: I81c2b8073bb3276fa9a4a6b93c427b641038356a
2012-08-29 12:47:41 -07:00
Elliott Hughes
c4d1fecc10 Clean up warnings in the malloc_debug_* files.
Also clean up cpplint.py-detected lint.

Change-Id: Ia18e89c4c6878764f8d7ed34b8247e7a8d8fe88b
2012-08-29 12:08:13 -07:00
Nick Kralevich
069c64cdf2 Merge "ARM: make sure __on_dlclose() actually gets called" 2012-08-28 13:04:22 -07:00
Nick Kralevich
e026b1d89a Merge "ARM: remove dummy entries from .so init_array/fini_array" 2012-08-28 12:49:46 -07:00
Nick Kralevich
ad18073897 Merge "linker: Fix ARM_R_COPY relocations" 2012-08-28 12:48:01 -07:00
Nick Kralevich
d39c3abd5a linker: Fix ARM_R_COPY relocations
Per http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044d/IHI0044D_aaelf.pdf
Section 4.7.1.10, ARM_R_COPY relocations are only suppose to reference shared
libraries, not the executable itself.  When resolving an R_ARM_COPY symbol,
ensure we don't look in our own symbol.

This partially addresses
http://code.google.com/p/android/issues/detail?id=28598 .  After this
patch, the printfs generated by the test program are:

global = 0x42 (0x401c7000)
global = 0x42 (0x11000)

before, the output was:

global = 0x42 (0x40071000)
global = 0x0 (0x11000)

I'm still not very happy with this patch, but I think it's an improvement
over where we were at before.

This change was modeled after https://android-review.googlesource.com/38871

Change-Id: Id7ad921e58395e76a36875bcc742ec5eeba53f08
2012-08-28 11:48:32 -07:00
Nick Kralevich
c410a9613a Merge "libc: remove ctors/dtors sections" 2012-08-28 10:20:27 -07:00
Ard Biesheuvel
c23092887f ARM: remove dummy entries from .so init_array/fini_array
The runtime linker parses the ELF section headers to
discover the size of the init_array and fini_array, so
there is no point in putting NULL terminators at the end.

Change-Id: I3246cd585efce9314155600277dd829e9f37d04f
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
2012-08-28 09:55:51 +02:00
Nick Kralevich
9dfaa63a1c Merge "Allow linker to compile with -DLINKER_DEBUG=1" 2012-08-27 16:00:50 -07:00
Elliott Hughes
bc366292ff Merge "Added missing cache failed notification" 2012-08-27 15:00:51 -07:00
Nick Kralevich
3697b52605 Allow linker to compile with -DLINKER_DEBUG=1
Change-Id: I27e734048cbcb9ed936369115582b3c734de1280
2012-08-24 17:11:45 -07:00
Ian Rogers
a37ce7faa6 Merge "Add missing va_end() to prevent stack corruptions" 2012-08-24 15:10:07 -07:00
Ard Biesheuvel
0a150ead18 libc: remove ctors/dtors sections
None of the supported ARCHs actually populate these sections,
so there is no point in keeping them in the binaries.

Change-Id: I21a364f510118ac1114e1b49c53ec8c895c6bc6b
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
2012-08-22 20:45:26 +02:00
Nick Kralevich
26facba288 Merge "hardening: remove pointless ARM __get_pc() function" 2012-08-22 11:41:53 -07:00
Ard Biesheuvel
404e28ff8c hardening: remove pointless ARM __get_pc() function
Useful if you're trying to defeat ASLR, otherwise not
so much ...

Change-Id: I17ebb50bb490a3967db9c3038f049adafe2b8ea7
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
2012-08-22 20:38:54 +02:00
Jean-Baptiste Queru
c7de022590 Merge "Use unambiguous mnemonics" 2012-08-22 07:18:50 -07:00
Kevin Schoedel
c0b4d18d7d Use unambiguous mnemonics
Change-Id: I8da0af54cc3cbf69d9e485eb71bc44a6976b1adc
Author: Kevin P Schoedel <kevin.p.schoedel@intel.com>
Reviewed-by: Edwin Vane <edwin.vane@intel.com>
2012-08-21 15:28:23 -04:00
Ard Biesheuvel
5ed48a4d7f ARM: make sure __on_dlclose() actually gets called
Change-Id: I280e5428b0543cccf17ca36baee4865395928cdb
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
2012-08-21 12:56:05 +02:00
Andrew Hsieh
1bd035cf11 Merge "Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS" 2012-08-21 03:25:46 -07:00
Andrew Hsieh
2f7d7c6538 Enclosed functions in fenv.h with __BEGIN_DECLS/__END_DECLS
Those are C funcitons

Related CL: https://android-review.googlesource.com/#/c/41833/

Change-Id: I4386bcf948ad31c3690c9b7a145103088133d041
2012-08-21 15:41:34 +08:00
Ian Rogers
7b0d9b7984 Merge "Restore posix_memalign" 2012-08-20 19:35:25 -07:00
Brian Carlstrom
bfc1d97531 Restore posix_memalign
Change-Id: I24e31bcb8b1d8be9375852e76964f09becd11938
2012-08-20 19:25:39 -07:00
Brian Carlstrom
c37dcd3d3a Merge "Upgrade to dlmalloc 2.8.5." 2012-08-20 16:12:33 -07:00
Ian Rogers
999089181e Upgrade to dlmalloc 2.8.5.
Move dlmalloc code to upstream-dlmalloc to make pulling upstream changes
easier.
Declare pvalloc and malloc_usable_size routines present in malloc.h but with
missing implementations. Remove other functions from malloc.h that have
no implementation nor use in Android.

Change-Id: Ia6472ec6cbebc9ad1ef99f4669de9d33fcc2efb4
2012-08-20 14:12:20 -07:00
Elliott Hughes
9417a80e48 Merge "Always define the 64-bit int types." 2012-08-17 16:48:14 -07:00
Elliott Hughes
200de748b9 Merge "Fix race condition in pthread_create()" 2012-08-17 16:19:56 -07:00
Jurijs Oniscuks
2932f04832 Fix race condition in pthread_create()
Save thread id to *thread_out before new
thread is allowed to run else there's a
risk that the thread has finished and
been deleted when *thread_out is assigned.

Change-Id: I6b84c61a8df06840877d4ab036f26feace3192d8
2012-08-17 16:18:32 -07:00
Elliott Hughes
6d6731adc0 Always define the 64-bit int types.
These preprocessor tricks have caused trouble for -std=gnu99 and -ansi, and
both netbsd's libc and glibc seem to unconditionally define these types.

Change-Id: Ib8dffa341a8ca88f80d275ba2b7f93a4c910ee32
2012-08-17 14:30:06 -07:00
Elliott Hughes
1771a33d11 Merge "Add link.h for all platforms with dl_phdr_info" 2012-08-17 13:54:43 -07:00
Pavel Chupin
b7beb69075 Add link.h for all platforms with dl_phdr_info
This header is used on bionic build and should be propagated into
sysroot on toolchain rebuild. Discussion re. this header is here:
http://gcc.gnu.org/ml/gcc-patches/2012-08/msg00936.html

It is available already in mips NDK platforms:
development/ndk/platforms/android-9/arch-mips/include/link.h

Change-Id: I39ff467cdac9f448e31c11ee3e14a6200e82ab57
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2012-08-17 12:44:23 -07:00
Henrik Engström
ce5ba8bfcd Added missing cache failed notification
Added a missing call to _resolv_cache_query_failed for another fail
case where it was missing (it doesn't go through the error handling
under the "fail" label). This missing notification caused requests to
have to wait for timeout instead of beeing notified on some failed
requests.

Change-Id: I904d60269c59b926784e3a397d2a860329f55142
2012-08-17 09:18:47 +02:00
Joe Onorato
6c98cdb192 Merge "Don't over-generalize makefiles. Host modules always build. This isn't needed on eng builds." 2012-08-16 23:37:50 -07:00
Joe Onorato
7b841f3b4a Don't over-generalize makefiles. Host modules always build. This isn't needed on eng builds.
Change-Id: I5821ced7a8a9042fd2094204e07470d8002263ca
2012-08-16 22:36:36 -07:00
Elliott Hughes
60ef95e1c1 Merge "Enhance getcwd(3) to handle NULL like glibc." 2012-08-16 16:58:34 -07:00
Elliott Hughes
04a83a48ed Enhance getcwd(3) to handle NULL like glibc.
Bug: http://code.google.com/p/android/issues/detail?id=36085
Change-Id: I960a1b585887eb66176c61d29c5c61c239a4003f
2012-08-16 15:59:12 -07:00
Elliott Hughes
449d4634be Merge "bionic: add macro protection for MALLOC_ALIGNMENT" 2012-08-16 12:09:13 -07:00
Jin Wei
9862f5e08b bionic: add macro protection for MALLOC_ALIGNMENT
In previous commit: 2fd81ef7, .mk file has been modified to
configure MALLOC_ALIGNMENT dynamicly according to board config.
Add the missing macor protection here.

Change-Id: I703cca2ce0504ab3e11aab226b2c61fcc0c6afa1
Author: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
2012-08-16 12:08:36 -07:00
Elliott Hughes
ae7280994e Merge "enable clone system call for x86" 2012-08-15 17:05:47 -07:00
Jin Wei
22d366cc09 enable clone system call for x86
Add __bionic_clone function for x86, which will be
used for clone system call.

Change-Id: I889dc9bf4b7ebb4358476e17e6f3233e26491f4d
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 51414
2012-08-15 17:04:50 -07:00
Elliott Hughes
07cd11251f Merge "Fix comment typos." 2012-08-15 16:59:21 -07:00
Elliott Hughes
105bc26fa6 Fix comment typos.
Change-Id: I8feeec1ee9935a6d6baebe57f1c0043ff90ff94f
2012-08-15 16:56:00 -07:00
Elliott Hughes
e1cd69a708 Merge "Regenerate all NOTICE files with the latest version of the script." 2012-08-15 16:51:56 -07:00
Elliott Hughes
32dbc03c73 Regenerate all NOTICE files with the latest version of the script.
This sorts every entry, so we should have more stability and fewer
merge conflicts in future.

Change-Id: Ifc5347dc53352da22c82d41ca59b483966fcfc6b
2012-08-15 15:43:13 -07:00