OSDN Git Service
The Android Open Source Project [Thu, 7 Jun 2012 14:51:59 +0000 (07:51 -0700)]
The Android Open Source Project [Thu, 7 Jun 2012 14:48:47 +0000 (07:48 -0700)]
Reconcile with jb-release
Change-Id: I2c8264a9a4e3299bca7fc01d67063993b6b1b886
Elliott Hughes [Wed, 6 Jun 2012 20:50:29 +0000 (13:50 -0700)]
am
d0c25027: am
2b89f1e3: Merge "Fix sysconf(_SC_NPROCESSORS_CONF) on ARM."
* commit '
d0c250271c983c3de282ff02bd2528e74ad8b5f1':
Fix sysconf(_SC_NPROCESSORS_CONF) on ARM.
Elliott Hughes [Wed, 6 Jun 2012 20:48:07 +0000 (13:48 -0700)]
am
2b89f1e3: Merge "Fix sysconf(_SC_NPROCESSORS_CONF) on ARM."
* commit '
2b89f1e37df838e466d382fc602728930bad4c68':
Fix sysconf(_SC_NPROCESSORS_CONF) on ARM.
Elliott Hughes [Wed, 6 Jun 2012 20:32:19 +0000 (13:32 -0700)]
Merge "Fix sysconf(_SC_NPROCESSORS_CONF) on ARM."
Elliott Hughes [Wed, 6 Jun 2012 19:04:38 +0000 (12:04 -0700)]
Fix sysconf(_SC_NPROCESSORS_CONF) on ARM.
Bug: http://code.google.com/p/enh/issues/detail?id=33
Change-Id: I679b4cd888d362031042284e8edf01c5273a92aa
Elliott Hughes [Wed, 6 Jun 2012 18:37:25 +0000 (11:37 -0700)]
am
3069270d: am
c2bba24d: Merge "Give the timer_create SIGEV_THREAD helper threads sensible names."
* commit '
3069270d8641c7bb57aa308d8f90b4d2dcbf66fc':
Give the timer_create SIGEV_THREAD helper threads sensible names.
Elliott Hughes [Wed, 6 Jun 2012 18:35:32 +0000 (11:35 -0700)]
am
c2bba24d: Merge "Give the timer_create SIGEV_THREAD helper threads sensible names."
* commit '
c2bba24d0a6b906f00d7b9f20ac9d32d63bb2e9d':
Give the timer_create SIGEV_THREAD helper threads sensible names.
Elliott Hughes [Wed, 6 Jun 2012 17:44:31 +0000 (10:44 -0700)]
Merge "Give the timer_create SIGEV_THREAD helper threads sensible names."
Elliott Hughes [Wed, 6 Jun 2012 17:32:56 +0000 (10:32 -0700)]
Give the timer_create SIGEV_THREAD helper threads sensible names.
Bug:
6609676
Change-Id: I286b197c75beee4d9930b0973f2d7dd47c14e91c
Nick Kralevich [Wed, 6 Jun 2012 15:54:22 +0000 (08:54 -0700)]
Merge "arm: rewrite crtbegin* as C files."
Nick Kralevich [Mon, 4 Jun 2012 22:20:25 +0000 (15:20 -0700)]
libc: implement some FORTIFY_SOURCE functions
Add initial support for -D_FORTIFY_SOURCE to bionic for the
following functions:
* memcpy
* memmove
* strcpy
* strcat
* strncpy
* strncat
This change adds a new version of the above functions which passes
the size of the destination buffer to __builtin___*_chk.
If the compiler can determine, at compile time, that the destination
buffer is large enough, or the destination buffer can point to an object
of unknown size, then the check call is bypassed.
If the compiler can't make a compile time decision, then it calls
the __*_chk() function, which does a runtime buffer size check
These options are only enabled if the code is compiled with
-D_FORTIFY_SOURCE=1 or 2, and only when optimizations are enabled.
Please see
* http://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html
* http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
for additional details on FORTIFY_SOURCE.
Testing: Compiled the entire Android tree with -D_FORTIFY_SOURCE=1,
and verified that everything appears to be working properly.
Also created a test buffer overflow, and verified that it was
caught by this change.
Change-Id: I4fddb445bafe92b16845b22458d72e6dedd24fbc
The Android Automerger [Sun, 3 Jun 2012 12:59:30 +0000 (05:59 -0700)]
merge in jb-release history after reset to jb-dev
Iliyan Malchev [Sat, 2 Jun 2012 15:35:07 +0000 (08:35 -0700)]
am
252a5c85: resolved conflicts for merge of
e1dd3c28 to jb-dev-plus-aosp
* commit '
252a5c854a08e89fc7337ea679220161fe4ea98f':
bionic: import heaptracker as chk_malloc
Iliyan Malchev [Sat, 2 Jun 2012 15:20:09 +0000 (08:20 -0700)]
am
f0ddaa2f: am
7d2e24eb: bionic: introduce libc.debug.malloc.program
* commit '
f0ddaa2fac00ac20059c0b2c142da9de2838a7b6':
bionic: introduce libc.debug.malloc.program
Iliyan Malchev [Sat, 2 Jun 2012 15:14:36 +0000 (08:14 -0700)]
resolved conflicts for merge of
e1dd3c28 to jb-dev-plus-aosp
Change-Id: I58b9c13d20771aa39b703ec05cbff8aeaad38fe8
Iliyan Malchev [Sat, 2 Jun 2012 02:03:06 +0000 (19:03 -0700)]
am
7d2e24eb: bionic: introduce libc.debug.malloc.program
* commit '
7d2e24eb167b6257f7935c7bd2023a708704ca1a':
bionic: introduce libc.debug.malloc.program
Iliyan Malchev [Tue, 29 May 2012 21:22:42 +0000 (14:22 -0700)]
bionic: import heaptracker as chk_malloc
This patch is a rewrite of libc.debug.malloc = 10 (chk_malloc). It provides
the same features as the original (poison freed memory, detect heap overruns
and underruns), except that it provides more debugging information whenever it
detects a problem.
In addition to the original features, the new chk_malloc() implementation
detects multiple frees within a given range of the last N allocations, N being
configurable via the system property libc.debug.malloc.backlog.
Finally, this patch keeps track of all outstanding memory allocations. On
program exit, we walk that list and report each outstanding allocation.
(There is support (not enabled) for a scanner thread periodically walks over
the list of outstanding allocations as well as the backlog of recently-freed
allocations, checking for heap-usage errors.)
Feature overview:
1) memory leaks
2) multiple frees
3) use after free
4) overrun
Implementation:
-- for each allocation, there is a:
1) stack trace at the time the allocation is made
2) if the memory is freed, there is also a stack trace at the point
3) a front and rear guard (fence)
4) the stack traces are kept together with the allocation
-- the following lists and maintained
1) all outstanding memory allocations
3) a backlog of allocations what are freed; when you call free(), instead of
actually freed, the allocation is moved to this backlog;
4) when the backlog of allocations gets full, the oldest entry gets evicted
from it; at that point, the allocation is checked for overruns or
use-after-free errors, and then actually freed.
5) when the program exits, the list of outstanding allocations and the
backlog are inspected for errors, then freed;
To use this, set the following system properties before running the process or
processes you want to inspect:
libc.malloc.debug.backlog # defaults to 100
libc.malloc.debug 10
When a problem is detected, you will see the following on logcat for a multiple
free:
E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 BYTES MULTIPLY FREED!
E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 ALLOCATED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c658 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d80 /system/lib/libc.so
E/libc ( 7233): #03 pc
4009647c /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 FIRST FREED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c7d2 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d94 /system/lib/libc.so
E/libc ( 7233): #03 pc
40096490 /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
E/libc ( 7233): +++ ALLOCATION 0x404b9278 SIZE 10 NOW BEING FREED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c6ac /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d94 /system/lib/libc.so
E/libc ( 7233): #03 pc
400964a0 /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
The following for a heap overrun and underrun:
E/libc ( 7233): +++ REAR GUARD MISMATCH [10, 11)
E/libc ( 7233): +++ ALLOCATION 0x404b9198 SIZE 10 HAS A CORRUPTED REAR GUARD
E/libc ( 7233): +++ ALLOCATION 0x404b9198 SIZE 10 ALLOCATED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c658 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d80 /system/lib/libc.so
E/libc ( 7233): #03 pc
40096438 /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
E/libc ( 7233): +++ ALLOCATION 0x404b9198 SIZE 10 FREED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c7d2 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d94 /system/lib/libc.so
E/libc ( 7233): #03 pc
40096462 /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
E/libc ( 7233): +++ ALLOCATION 0x404b9358 SIZE 10 HAS A CORRUPTED FRONT GUARD
E/libc ( 7233): +++ ALLOCATION 0x404b9358 SIZE 10 ALLOCATED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c658 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d80 /system/lib/libc.so
E/libc ( 7233): #03 pc
400964ba /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
E/libc ( 7233): +++ ALLOCATION 0x404b9358 SIZE 10 FREED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c7d2 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d94 /system/lib/libc.so
E/libc ( 7233): #03 pc
400964e4 /system/bin/malloctest
E/libc ( 7233): #04 pc
00016f24 /system/lib/libc.so
The following for a memory leak:
E/libc ( 7233): +++ THERE ARE 1 LEAKED ALLOCATIONS
E/libc ( 7233): +++ DELETING 4096 BYTES OF LEAKED MEMORY AT 0x404b95e8 (1 REMAINING)
E/libc ( 7233): +++ ALLOCATION 0x404b95e8 SIZE 4096 ALLOCATED HERE:
E/libc ( 7233): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
E/libc ( 7233): #00 pc
0000c35a /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #01 pc
0000c658 /system/lib/libc_malloc_debug_leak.so
E/libc ( 7233): #02 pc
00016d80 /system/lib/libc.so
E/libc ( 7233): #03 pc
0001bc94 /system/lib/libc.so
E/libc ( 7233): #04 pc
0001edf6 /system/lib/libc.so
E/libc ( 7233): #05 pc
0001b80a /system/lib/libc.so
E/libc ( 7233): #06 pc
0001c086 /system/lib/libc.so
E/libc ( 7233): #07 pc
40096402 /system/bin/malloctest
E/libc ( 7233): #08 pc
00016f24 /system/lib/libc.so
Change-Id: Ic440e9d05a01e2ea86b25e8998714e88bc2d16e0
Signed-off-by: Iliyan Malchev <malchev@google.com>
Nick Kralevich [Thu, 31 May 2012 18:40:10 +0000 (11:40 -0700)]
arm: rewrite crtbegin* as C files.
Rewrite
crtbegin.S -> crtbegin.c
crtbegin_so.S -> crtbegin_so.c
This change allows us to generate PIC code without relying
on text relocations.
As a consequence of this rewrite, also rewrite
__dso_handle.S -> __dso_handle.c
__dso_handle_so.S -> __dso_handle_so.c
atexit.S -> atexit.c
In crtbegin.c _start, place the __PREINIT_ARRAY__, __INIT_ARRAY__,
__FINI_ARRAY__, and __CTOR_LIST__ variables onto the stack, instead of
passing a pointer to the text section of the binary.
This change appears sorta wonky, as I attempted to preserve,
as much as possible, the structure of the original assembly.
As a result, you have C files including other C files, and other
programming uglyness.
Result: This change reduces the number of files with text-relocations
from 315 to 19 on my Android build.
Before:
$ scanelf -aR $OUT/system | grep TEXTREL | wc -l
315
After:
$ scanelf -aR $OUT/system | grep TEXTREL | wc -l
19
Change-Id: Ib9f98107c0eeabcb606e1ddc7ed7fc4eba01c9c4
The Android Automerger [Thu, 31 May 2012 13:59:25 +0000 (06:59 -0700)]
merge in jb-release history after reset to jb-dev
Iliyan Malchev [Tue, 29 May 2012 23:46:17 +0000 (16:46 -0700)]
bionic: introduce libc.debug.malloc.program
libc.debug.malloc.program provides an additional level of control over which
processes to enable libc.debug.malloc functionality for. The string value of
libc.debug.malloc.program is matched against the program name; if the value of
libc.debug.malloc.program is a substring of the program name, then malloc debug
is applied to that program at whatever level libc.debug.malloc specifies.
If lib.debug.malloc.program is not specified, then libc.debug.malloc has the
same effect as before.
For example, to enable libc.deubug.malloc = 10 only to the mediaserver, do the
following:
adb root # necessary for setprop
adb setprop libc.debug.malloc.program mediaserver
adb setprop libc.debug.malloc 10
adb kill -9 $(pid mediaserver)
Change-Id: I6f01c12f033c8e2e015d73025369d7f1685ba200
Signed-off-by: Iliyan Malchev <malchev@google.com>
Nick Kralevich [Wed, 30 May 2012 20:29:58 +0000 (13:29 -0700)]
Merge "crtbegin: eliminate duplicate code"
Nick Kralevich [Wed, 30 May 2012 18:45:12 +0000 (11:45 -0700)]
crtbegin: eliminate duplicate code
crtbegin_dynamic and crtbegin_static are essentially identical,
minus a few trivial differences (comments and whitespace).
Eliminate duplicates.
Change-Id: Ic9fae6bc9695004974493b53bfc07cd3bb904480
Geremy Condra [Wed, 30 May 2012 18:11:33 +0000 (11:11 -0700)]
am
5a095ef2: am
03539a36: Merge "Ensure that the port number and TXID are properly randomized." into jb-dev
* commit '
5a095ef28716b54f86d9c1727b9a2493ba775255':
Ensure that the port number and TXID are properly randomized.
Geremy Condra [Wed, 30 May 2012 18:09:05 +0000 (11:09 -0700)]
am
03539a36: Merge "Ensure that the port number and TXID are properly randomized." into jb-dev
* commit '
03539a36b634bdfa61c06277cf25e0ca8e3105ba':
Ensure that the port number and TXID are properly randomized.
Geremy Condra [Wed, 30 May 2012 18:06:54 +0000 (11:06 -0700)]
Merge "Ensure that the port number and TXID are properly randomized." into jb-dev
The Android Open Source Project [Tue, 29 May 2012 16:41:51 +0000 (09:41 -0700)]
am
cb9ba3c8: Reconcile with jb-release
* commit '
cb9ba3c88a97f34784559a55317ff5970d4c4dba':
Print the corrupted address passed to free().
The Android Open Source Project [Tue, 29 May 2012 16:39:17 +0000 (09:39 -0700)]
Reconcile with jb-release
Change-Id: Id0b365ef6729dc36b88193f1675d3819e56bd426
Elliott Hughes [Fri, 25 May 2012 22:11:35 +0000 (15:11 -0700)]
Merge "Use mmap to read an initial ELF header of library"
Ji-Hwan Lee [Fri, 25 May 2012 13:36:00 +0000 (22:36 +0900)]
Use mmap to read an initial ELF header of library
Also, fixes SIGSEV during calculation of si->phdr in load_library(),
which is caused by accessing PHDR area, which is not guaranteed to be
loaded.
Note that this usually does not happen because program header area is
covered by immediately following PT_LOAD entry. But it does not hold
always.
Bug:
6561258
Change-Id: Ie376253c773b5420279ca89044e81b1aad5a5736
Ben Cheng [Thu, 24 May 2012 23:56:53 +0000 (16:56 -0700)]
Print the corrupted address passed to free().
For example:
@@@ ABORTING: INVALID HEAP ADDRESS IN dlfree addr=0x5c3bfbd0
Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 2942
The addr=0x5c3bfbd0 part is new.
Change-Id: I8670144b2b0a3a6182384150d762c97dfee5452f
Ben Cheng [Fri, 25 May 2012 00:23:43 +0000 (17:23 -0700)]
am
d7b60b20: am
c84ff11d: Print the corrupted address passed to free().
* commit '
d7b60b207be79513b99faf2ef576db333f9c7a78':
Print the corrupted address passed to free().
Ben Cheng [Fri, 25 May 2012 00:21:03 +0000 (17:21 -0700)]
am
c84ff11d: Print the corrupted address passed to free().
* commit '
c84ff11dad26435dc5760bceda18e8f1175a6061':
Print the corrupted address passed to free().
Ben Cheng [Thu, 24 May 2012 23:56:53 +0000 (16:56 -0700)]
Print the corrupted address passed to free().
For example:
@@@ ABORTING: INVALID HEAP ADDRESS IN dlfree addr=0x5c3bfbd0
Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 2942
The addr=0x5c3bfbd0 part is new.
Change-Id: I8670144b2b0a3a6182384150d762c97dfee5452f
Geremy Condra [Mon, 21 May 2012 21:20:59 +0000 (14:20 -0700)]
Ensure that the port number and TXID are properly randomized.
This fix reads from /dev/urandom to get the required entropy.
Bug:
6535492
Change-Id: Ibc2fec3f71a67607b608ad9b767b0b6504993c1d
Jean-Baptiste Queru [Mon, 21 May 2012 19:41:30 +0000 (12:41 -0700)]
am
d155ba57: am
c7882ab2: Merge "bionic: add clean kernel header ucontext.h"
* commit '
d155ba57a32ce3182d8a5b79ff27bc5e7fa55df9':
bionic: add clean kernel header ucontext.h
Elliott Hughes [Fri, 18 May 2012 00:15:01 +0000 (17:15 -0700)]
resolved conflicts for merge of
dc6c2b77 to master
Change-Id: Ifab4573a825cf5caa7158d8888243bb8d5d01148
Jean-Baptiste Queru [Thu, 17 May 2012 20:28:10 +0000 (13:28 -0700)]
am
c7882ab2: Merge "bionic: add clean kernel header ucontext.h"
* commit '
c7882ab2a99a74c8f772ab03fdfd9a3b53515e46':
bionic: add clean kernel header ucontext.h
Jean-Baptiste Queru [Thu, 17 May 2012 19:25:01 +0000 (12:25 -0700)]
Merge "bionic: add clean kernel header ucontext.h"
Elliott Hughes [Thu, 17 May 2012 00:18:23 +0000 (17:18 -0700)]
am
70cf0bc0: Merge "Remove the last references to SuperH."
* commit '
70cf0bc0496a1d4c0e83fe3f1933f667ab66c148':
Remove the last references to SuperH.
Elliott Hughes [Wed, 16 May 2012 16:56:37 +0000 (09:56 -0700)]
Merge "Remove the last references to SuperH."
Nick Kralevich [Wed, 16 May 2012 16:17:32 +0000 (09:17 -0700)]
am
1727a041: am
cf8e554c: (-s ours) Merge "Make the linker relocatable."
* commit '
1727a041b59995b00c1d497022600be929bcaf3e':
Make the linker relocatable.
Nick Kralevich [Wed, 16 May 2012 16:15:15 +0000 (09:15 -0700)]
am
574e8ec2: am
36e0345a: Merge "linker: set LOCAL_NO_CRT := true"
* commit '
574e8ec28fac106a5e9b2c98b7b5a4e9532ecf5c':
linker: set LOCAL_NO_CRT := true
Nick Kralevich [Wed, 16 May 2012 16:15:14 +0000 (09:15 -0700)]
am
ee6916c0: am
1adc7c03: Merge "linker: Fix the computation of si->base"
* commit '
ee6916c00718185df3930a18050e5b47685ef524':
linker: Fix the computation of si->base
Nick Kralevich [Wed, 16 May 2012 16:15:07 +0000 (09:15 -0700)]
am
c62d55cb: am
cd6b2007: (-s ours) Merge "Add linker support for PIE"
* commit '
c62d55cbaef8001c7eb0a8d5e85e2fc72283063a':
Add linker support for PIE
Nick Kralevich [Wed, 16 May 2012 16:14:22 +0000 (09:14 -0700)]
am
cf8e554c: (-s ours) Merge "Make the linker relocatable."
* commit '
cf8e554c72af1dd634d4f36a9065e34e853f8714':
Make the linker relocatable.
Nick Kralevich [Wed, 16 May 2012 16:11:52 +0000 (09:11 -0700)]
am
36e0345a: Merge "linker: set LOCAL_NO_CRT := true"
* commit '
36e0345af89e2ed768ed38dcdf016a7640cf8ba5':
linker: set LOCAL_NO_CRT := true
Nick Kralevich [Wed, 16 May 2012 16:11:50 +0000 (09:11 -0700)]
am
1adc7c03: Merge "linker: Fix the computation of si->base"
* commit '
1adc7c03898ee1f6a4c7f8cffa3c07507b9da5a9':
linker: Fix the computation of si->base
Nick Kralevich [Wed, 16 May 2012 16:11:49 +0000 (09:11 -0700)]
am
cd6b2007: (-s ours) Merge "Add linker support for PIE"
* commit '
cd6b2007b851f1cfa47d8bcc7ec859dfa7557382':
Add linker support for PIE
The Android Open Source Project [Wed, 16 May 2012 15:34:13 +0000 (08:34 -0700)]
am
918e6a73: Reconcile with jb-release nakasi-factoryrom-release
* commit '
918e6a730cd059392ee6d8b5c5a0f5fa0e5bbd93':
Revert "linker: remove STB_LOCAL hack"
Revert "Reference __dso_handle in PIC way"
Revert "Use the new NativeDaemonConnector style."
libc: Add __aeabi_llsl and __aeabi_llsr to libgcc_compat
The Android Open Source Project [Wed, 16 May 2012 15:31:49 +0000 (08:31 -0700)]
Reconcile with jb-release nakasi-factoryrom-release
Change-Id: I5a5b95da6c33afbc36893e162f3b57c09c161ee2
Elliott Hughes [Wed, 16 May 2012 00:03:18 +0000 (17:03 -0700)]
Remove the last references to SuperH.
Change-Id: Icb44c1f94cb178d90b4c2b1e8f6d175586aec4e1
Ying Wang [Tue, 15 May 2012 22:15:11 +0000 (15:15 -0700)]
Rename the misleading var name TARGET_OUT_STATIC_LIBRARIES
TARGET_OUT_STATIC_LIBRARIES is actually the same as
TARGET_OUT_INTERMEDIATE_LIBRARIES.
Change-Id: I11ac35256031d461d20156cd4c19ed7eae781d22
Nick Kralevich [Tue, 15 May 2012 22:10:24 +0000 (15:10 -0700)]
Merge "Make the linker relocatable."
Nick Kralevich [Tue, 15 May 2012 22:10:12 +0000 (15:10 -0700)]
Merge "linker: set LOCAL_NO_CRT := true"
Nick Kralevich [Tue, 15 May 2012 22:10:00 +0000 (15:10 -0700)]
Merge "linker: Fix the computation of si->base"
Nick Kralevich [Tue, 15 May 2012 22:09:45 +0000 (15:09 -0700)]
Merge "Add linker support for PIE"
Nick Kralevich [Fri, 11 Nov 2011 23:53:17 +0000 (15:53 -0800)]
Make the linker relocatable.
Previously, the linker always loaded itself into the same
location in memory, which inhibited the effectiveness of Android's
ASLR implementation. Modify the linker code so it can be relocatable
and link itself at runtime.
Change-Id: Ia80273d7a00ff648b4da545f4b69debee6343968
Nick Kralevich [Fri, 4 Nov 2011 17:11:26 +0000 (10:11 -0700)]
linker: set LOCAL_NO_CRT := true
Use LOCAL_NO_CRT to prevent linking against crtbegin.o, rather than
messing with build rules. This also prevents linking against crtend.o,
which isn't needed for the linker.
Change-Id: I0c5b9999be7e8676560fe145c1c033ffce8db4d1
David 'Digit' Turner [Tue, 15 Nov 2011 16:17:28 +0000 (17:17 +0100)]
linker: Fix the computation of si->base
The computation of si->base assumed that the first entry in the
program header table is a PT_PHDR. This results in the dynamic
linker crashing with a SIGSEGV/MAPERR when trying to load some
of the NDK unit test programs, which happen to have an EXIDX
header first, followed byu a PHDR one.
This patch fixes the computation by parsing the program header
table, looking explicitely for the PHDR entry. This fixes the
load of the NDK unit test programs, and doesn't affect system
libraries.
Change-Id: Id18ea6037dbe950b5abbbce816c2960321f0b81d
Nick Kralevich [Thu, 20 Oct 2011 21:57:56 +0000 (14:57 -0700)]
Add linker support for PIE
Modify the dynamic linker so that executables can be loaded
at locations other than 0x00000000.
Modify crtbegin* so that non-PIC compilant "thumb interwork
veneers" are not created by the linker.
Bug:
5323301
Change-Id: Iece0272e2b708c79034f302c20160e1fe9029588
Kito Cheng [Sun, 13 May 2012 17:42:12 +0000 (01:42 +0800)]
bionic: add clean kernel header ucontext.h
Change-Id: I34fd0b0147fa33fd74c13480bc11827634233a41
Elliott Hughes [Fri, 11 May 2012 06:15:00 +0000 (23:15 -0700)]
am
f2f7bf76: am
4f05d1c7: Merge "bionic/x86: Optimization for memcpy"
* commit '
f2f7bf76dfd1d6014ed3baa1e27b221388e70a09':
bionic/x86: Optimization for memcpy
Elliott Hughes [Fri, 11 May 2012 04:31:48 +0000 (21:31 -0700)]
am
4f05d1c7: Merge "bionic/x86: Optimization for memcpy"
* commit '
4f05d1c758ba141c617f25251a661ecb66627e9e':
bionic/x86: Optimization for memcpy
Elliott Hughes [Thu, 10 May 2012 17:14:43 +0000 (10:14 -0700)]
Merge "bionic/x86: Optimization for memcpy"
Iliyan Malchev [Thu, 10 May 2012 16:24:46 +0000 (09:24 -0700)]
am
8034415d: resolved conflicts for merge of
08e72d01 to jb-dev-plus-aosp
* commit '
8034415ddd8404f8788199ed993af89692235dc5':
bionic: add support for non-NEON memcpy() on NEON SoCs
Iliyan Malchev [Thu, 10 May 2012 16:19:59 +0000 (09:19 -0700)]
resolved conflicts for merge of
08e72d01 to jb-dev-plus-aosp
Change-Id: If00e354a5953ed54b31963d4f8ea77e1603c321e
The Android Automerger [Thu, 10 May 2012 13:59:27 +0000 (06:59 -0700)]
merge in jb-release history after reset to jb-dev
Elliott Hughes [Thu, 10 May 2012 03:12:40 +0000 (20:12 -0700)]
am
804147cb: am
edb7cad9: Merge "Actually set the header guard in "linux-syscalls.h"."
* commit '
804147cb7d533f5635da6adc28fbca1467a3078b':
Actually set the header guard in "linux-syscalls.h".
Elliott Hughes [Thu, 10 May 2012 03:10:14 +0000 (20:10 -0700)]
am
edb7cad9: Merge "Actually set the header guard in "linux-syscalls.h"."
* commit '
edb7cad9b764f029c5faac2750f749d3d84bd86a':
Actually set the header guard in "linux-syscalls.h".
Elliott Hughes [Wed, 9 May 2012 23:39:40 +0000 (16:39 -0700)]
Merge "Actually set the header guard in "linux-syscalls.h"."
Elliott Hughes [Wed, 9 May 2012 23:34:11 +0000 (16:34 -0700)]
Actually set the header guard in "linux-syscalls.h".
Spotted while merging a MIPS change.
Change-Id: I36fb5a07d0bba0c117e9fe9733957bd37ca4b4c0
Elliott Hughes [Wed, 9 May 2012 20:57:12 +0000 (13:57 -0700)]
am
dbd5ecad: resolved conflicts for merge of
e5408907 to jb-dev-plus-aosp
* commit '
dbd5ecad26e39281bb83f97664bc32555c5c071a':
[MIPS] Add support for MIPS syscalls
Elliott Hughes [Wed, 9 May 2012 20:53:37 +0000 (13:53 -0700)]
resolved conflicts for merge of
e5408907 to jb-dev-plus-aosp
Change-Id: If4c3f51bf87b28da8074be2e46ae772a374b266f
Prajakta Gudadhe [Mon, 7 May 2012 21:17:44 +0000 (14:17 -0700)]
bionic: add support for non-NEON memcpy() on NEON SoCs
Some SoCs that support NEON nevertheless perform better with a non-NEON than a
NEON memcpy(). This patch adds build variable ARCH_ARM_USE_NON_NEON_MEMCPY,
which can be set in BoardConfig.mk. When ARCH_ARM_USE_NON_NEON_MEMCPY is
defined, we compile in the non-NEON optimized memcpy() even if the SoC supports
NEON.
Change-Id: Ia0e5bee6bad5880ffc5ff8f34a1382d567546cf9
Elliott Hughes [Wed, 9 May 2012 19:56:15 +0000 (12:56 -0700)]
am
58a00b49: am
7eb1cc23: Merge "bionic: allow the board to customize MALLOC_ALIGNMENT"
* commit '
58a00b4977b6fa073a8f56d94d741b1e4cb49856':
bionic: allow the board to customize MALLOC_ALIGNMENT
Elliott Hughes [Wed, 9 May 2012 19:56:15 +0000 (12:56 -0700)]
am
eab2889e: am
fd955033: Merge "pthread: Invalidate stale stack pointers on pthread_exit()"
* commit '
eab2889e66d4fe03f3c5590d7e8b14e3777179ec':
pthread: Invalidate stale stack pointers on pthread_exit()
Elliott Hughes [Wed, 9 May 2012 19:53:16 +0000 (12:53 -0700)]
am
7eb1cc23: Merge "bionic: allow the board to customize MALLOC_ALIGNMENT"
* commit '
7eb1cc23f8976a2062ba0cf92f030216a8e64e60':
bionic: allow the board to customize MALLOC_ALIGNMENT
Elliott Hughes [Wed, 9 May 2012 19:53:16 +0000 (12:53 -0700)]
am
fd955033: Merge "pthread: Invalidate stale stack pointers on pthread_exit()"
* commit '
fd95503347acba5c52d669a186ad2b161338a8a7':
pthread: Invalidate stale stack pointers on pthread_exit()
Elliott Hughes [Wed, 9 May 2012 18:50:06 +0000 (11:50 -0700)]
Merge "[MIPS] Add support for MIPS syscalls"
Raghu Gandham [Sat, 28 Jan 2012 01:51:42 +0000 (17:51 -0800)]
[MIPS] Add support for MIPS syscalls
Change-Id: I4deba67e15c865c4c2db03064c04098a09828ea6
Signed-off-by: Raghu Gandham <raghu@mips.com>
Signed-off-by: Chris Dearman <chris@mips.com>
Elliott Hughes [Wed, 9 May 2012 17:13:02 +0000 (10:13 -0700)]
am
57f8d4b5: resolved conflicts for merge of
3919b96e to jb-dev-plus-aosp
* commit '
57f8d4b5b5564fad7a9c7f8a6e5108f31c75056f':
Implement the "abort" stub in assembly for ARM.
Ben Cheng [Wed, 9 May 2012 17:12:04 +0000 (10:12 -0700)]
am
da0d8534: am
08b51e2c: Implement the "abort" stub in assembly for ARM.
* commit '
da0d8534f1a6273a383f1dc631fbaf032674bb4d':
Implement the "abort" stub in assembly for ARM.
Elliott Hughes [Wed, 9 May 2012 16:52:56 +0000 (09:52 -0700)]
Merge "bionic: allow the board to customize MALLOC_ALIGNMENT"
Jack Ren [Sat, 19 Nov 2011 01:48:03 +0000 (09:48 +0800)]
bionic: allow the board to customize MALLOC_ALIGNMENT
Currently the dlmalloc allocates the memory with 8-byte alignment.
According to the com.aurorasoftworks.quadrant.ui.professional benchmark data:
We can get much better memory performance if we change it to be 16-byte aligned.
For example, On Nexus-S:
8-byte aligned :
1378 1070 1142 1665 1765 1163 1179 1263 1404 avg: 1336.
555555556
16-byte aligned:
1691 1731 1780 1691 1671 1678 1802 1758 1780 avg: 1731.
333333333
gain: 29.53%
That patch provides flexibity to customize the MALLOC_ALIGNMENT from the
board config.The macro MALLOC_ALIGNMENT defaults to 8.
To change it, please define BOARD_MALLOC_ALIGNMENT in the BoardConfig.mk:
BOARD_MALLOC_ALIGNMENT := <whatever>
Change-Id: I8da0376944a0bbcef1d0fc026bfb6d9125db9739
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Elliott Hughes [Wed, 9 May 2012 16:46:02 +0000 (09:46 -0700)]
Merge "pthread: Invalidate stale stack pointers on pthread_exit()"
Elliott Hughes [Wed, 9 May 2012 16:38:40 +0000 (09:38 -0700)]
resolved conflicts for merge of
3919b96e to jb-dev-plus-aosp
Change-Id: I80571b5f024a4e1abe2606d10e07006f53bbc01f
The Android Automerger [Wed, 9 May 2012 14:46:07 +0000 (07:46 -0700)]
merge in jb-release history after reset to jb-dev
Elliott Hughes [Wed, 9 May 2012 08:54:16 +0000 (01:54 -0700)]
am
a674a571: am
20bea000: Merge "Cherry-pick "generate PIC code"."
* commit '
a674a571dbf0eebf4825f80f3ab229b1d62d49da':
Cherry-pick "generate PIC code".
Ben Cheng [Wed, 9 May 2012 08:48:40 +0000 (01:48 -0700)]
am
08b51e2c: Implement the "abort" stub in assembly for ARM.
* commit '
08b51e2c091d036c124259ae59eb7be6bbe346af':
Implement the "abort" stub in assembly for ARM.
Elliott Hughes [Wed, 9 May 2012 02:57:58 +0000 (19:57 -0700)]
am
20bea000: Merge "Cherry-pick "generate PIC code"."
* commit '
20bea00090e530f2e6f4d97de4b7cf8031b86a86':
Cherry-pick "generate PIC code".
Bjorn Andersson [Fri, 4 May 2012 00:12:39 +0000 (17:12 -0700)]
pthread: Invalidate stale stack pointers on pthread_exit()
A call to pthread_key_delete() after pthread_exit() have unmapped the stack of a thread
but before the ongoing pthread_join() have finished executing will result in an access
to unmapped memory.
Avoid this by invalidating the stack_base and tls pointers during pthread_exit().
This is based on the investigation and proprosed solution by
Srinavasa Nagaraju <srinavasa.x.nagaraju@sonyericsson.com>
Change-Id: I145fb5d57930e91b00f1609d7b2cd16a55d5b3a9
Elliott Hughes [Tue, 8 May 2012 22:13:20 +0000 (15:13 -0700)]
am
9c3eca7b: resolved conflicts for merge of
6cf3c7c5 to jb-dev-plus-aosp
* commit '
9c3eca7bcee694e6a477a7d50065f11cf1e805bb':
Let pthread_create fail if schedparam can't be set
Elliott Hughes [Tue, 8 May 2012 21:54:56 +0000 (14:54 -0700)]
Merge "Implement the "abort" stub in assembly for ARM."
Ben Cheng [Tue, 8 May 2012 20:36:37 +0000 (13:36 -0700)]
Implement the "abort" stub in assembly for ARM.
So that we can always get the full stack trace regardless of gcc's handling
of the "noreturn" attribute associated with abort().
(Cherry pick of Id264a5167e7cabbf11515fbc48f5469c527e34d4.)
Bug:
6455193
Conflicts:
libc/Android.mk
Change-Id: I568fc5303fd1d747075ca933355f914122f94dac
Ben Cheng [Tue, 8 May 2012 20:36:37 +0000 (13:36 -0700)]
Implement the "abort" stub in assembly for ARM.
So that we can always get the full stack trace regardless of gcc's handling
of the "noreturn" attribute associated with abort().
[cherry-picked from master]
BUG:
6455193
Change-Id: I0102355f5bf20e636d3feab9d1424495f38e39e2
Ben Cheng [Tue, 8 May 2012 21:01:22 +0000 (14:01 -0700)]
Merge "Implement the "abort" stub in assembly for ARM."
Ben Cheng [Tue, 8 May 2012 20:36:37 +0000 (13:36 -0700)]
Implement the "abort" stub in assembly for ARM.
So that we can always get the full stack trace regardless of gcc's handling
of the "noreturn" attribute associated with abort().
BUG:
6455193
Change-Id: Id264a5167e7cabbf11515fbc48f5469c527e34d4
Elliott Hughes [Tue, 8 May 2012 20:26:28 +0000 (13:26 -0700)]
resolved conflicts for merge of
6cf3c7c5 to jb-dev-plus-aosp
Change-Id: Ib22a8ae1ef63bf9b9c82ce6e22afd188ba7c2806
Jack Ren [Tue, 14 Feb 2012 08:01:52 +0000 (12:01 +0400)]
bionic/x86: Optimization for memcpy
Signed-off-by: Liubov Dmitrieva <liubov.dmitrieva@intel.com>
Signed-off-by: H.J. Lu <hongjiu.lu@intel.com>
Signed-off-by: Wei A Jin <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Conflicts:
libc/arch-x86/string/ssse3-memcpy5.S
Change-Id: I41e70d1d19d5457e65c89b64da452fbdaf3a00a7