OSDN Git Service

android-x86/bionic.git
12 years agoresolved conflicts for merge of e5408907 to jb-dev-plus-aosp
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

12 years agoam 7eb1cc23: Merge "bionic: allow the board to customize MALLOC_ALIGNMENT"
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

12 years agoam fd955033: Merge "pthread: Invalidate stale stack pointers on pthread_exit()"
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()

12 years agoMerge "[MIPS] Add support for MIPS syscalls"
Elliott Hughes [Wed, 9 May 2012 18:50:06 +0000 (11:50 -0700)]
Merge "[MIPS] Add support for MIPS syscalls"

12 years ago[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>
12 years agoMerge "bionic: allow the board to customize MALLOC_ALIGNMENT"
Elliott Hughes [Wed, 9 May 2012 16:52:56 +0000 (09:52 -0700)]
Merge "bionic: allow the board to customize MALLOC_ALIGNMENT"

12 years agobionic: 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>
12 years agoMerge "pthread: Invalidate stale stack pointers on pthread_exit()"
Elliott Hughes [Wed, 9 May 2012 16:46:02 +0000 (09:46 -0700)]
Merge "pthread: Invalidate stale stack pointers on pthread_exit()"

12 years agoresolved conflicts for merge of 3919b96e to jb-dev-plus-aosp
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

12 years agoam 08b51e2c: Implement the "abort" stub in assembly for ARM.
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.

12 years agoam 20bea000: Merge "Cherry-pick "generate PIC code"."
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".

12 years agopthread: Invalidate stale stack pointers on pthread_exit()
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

12 years agoMerge "Implement the "abort" stub in assembly for ARM."
Elliott Hughes [Tue, 8 May 2012 21:54:56 +0000 (14:54 -0700)]
Merge "Implement the "abort" stub in assembly for ARM."

12 years agoImplement 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

12 years agoImplement 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-picked from master]

BUG:6455193
Change-Id: I0102355f5bf20e636d3feab9d1424495f38e39e2

12 years agoresolved conflicts for merge of 6cf3c7c5 to jb-dev-plus-aosp
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

12 years agoMerge "Cherry-pick "generate PIC code"."
Elliott Hughes [Tue, 8 May 2012 18:56:13 +0000 (11:56 -0700)]
Merge "Cherry-pick "generate PIC code"."

12 years agoCherry-pick "generate PIC code".
Nick Kralevich [Fri, 11 Nov 2011 23:47:24 +0000 (15:47 -0800)]
Cherry-pick "generate PIC code".

Change-Id: I7d5f2e5663df263493f65e364c959e663fc4d13a

12 years agoMerge "Let pthread_create fail if schedparam can't be set"
Elliott Hughes [Tue, 8 May 2012 17:56:00 +0000 (10:56 -0700)]
Merge "Let pthread_create fail if schedparam can't be set"

12 years agoLet pthread_create fail if schedparam can't be set
Pierre Peiffer [Wed, 22 Feb 2012 15:40:15 +0000 (16:40 +0100)]
Let pthread_create fail if schedparam can't be set

The creation of a thread succeeds even if the requested scheduling
parameters can not be set. This is not POSIX compliant, and even
worse, it leads to a wrong behavior. Let pthread_create() fail in this
case.

Change-Id: Ice66e2a720975c6bde9fe86c2cf8f649533a169c
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
12 years agoam e3bc7192: Merge "bionic: fix integer overflows in chk_malloc(), leak_malloc()...
Elliott Hughes [Mon, 7 May 2012 21:00:01 +0000 (14:00 -0700)]
am e3bc7192: Merge "bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()"

* commit 'e3bc7192ec4254bed00eb8b352735665c6072995':
  bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()

12 years agoam 73a6566d: Merge "Remove expired dns cache entries before removing oldest"
Elliott Hughes [Mon, 7 May 2012 20:59:59 +0000 (13:59 -0700)]
am 73a6566d: Merge "Remove expired dns cache entries before removing oldest"

* commit '73a6566da337db50cfc73c369d774ac1905a30c2':
  Remove expired dns cache entries before removing oldest

12 years agoam 8657eafc: Merge "Adjust memcpy for ARM Cortex A9 cache line size"
Elliott Hughes [Mon, 7 May 2012 20:59:58 +0000 (13:59 -0700)]
am 8657eafc: Merge "Adjust memcpy for ARM Cortex A9 cache line size"

* commit '8657eafc3552f36c176667c1591beab255308da6':
  Adjust memcpy for ARM Cortex A9 cache line size

12 years agoMerge "bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()"
Elliott Hughes [Mon, 7 May 2012 17:51:28 +0000 (10:51 -0700)]
Merge "bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()"

12 years agobionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()
Xi Wang [Wed, 14 Mar 2012 06:48:39 +0000 (02:48 -0400)]
bionic: fix integer overflows in chk_malloc(), leak_malloc(), and leak_memalign()

The allocation size in chk_malloc(), leak_malloc(), and leak_memalign()
functions may be rounded up to a small value, leading to buffer overflows.
The code only runs in debugging mode.

This patch complements commit 6f04a0f4 (CVE-2009-0607).

Change-Id: Id899bcd2bcd2ea2205e5753c433390710032dc83
Signed-off-by: Xi Wang <xi.wang@gmail.com>
12 years agoMerge "Remove expired dns cache entries before removing oldest"
Elliott Hughes [Mon, 7 May 2012 17:41:52 +0000 (10:41 -0700)]
Merge "Remove expired dns cache entries before removing oldest"

12 years agoMerge "Adjust memcpy for ARM Cortex A9 cache line size"
Elliott Hughes [Mon, 7 May 2012 16:13:34 +0000 (09:13 -0700)]
Merge "Adjust memcpy for ARM Cortex A9 cache line size"

12 years agoAdjust memcpy for ARM Cortex A9 cache line size
Henrik Smiding [Wed, 15 Sep 2010 14:08:03 +0000 (16:08 +0200)]
Adjust memcpy for ARM Cortex A9 cache line size

ARM Cortex A8 use 64 bytes and ARM Cortex A9 use 32 bytes cache line
size.

The following patch:
  Adds code to adjust memcpy cache line size to match A9 cache line
  size.
  Adds a flag to select between 32 bytes and 64 bytes cache line
  size.

  Copyright (C) ST-Ericsson SA 2010
    Modified neon implementation to fit Cortex A9 cache line size
    Author: Henrik Smiding henrik.smiding@stericsson.com for
            ST-Ericsson.

Change-Id: I8a55946bfb074e6ec0a14805ed65f73fcd0984a3
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
12 years agoam f7db5ecc: Merge "MIPS support to libm, libdl and libthread_db"
Elliott Hughes [Sat, 5 May 2012 01:07:11 +0000 (18:07 -0700)]
am f7db5ecc: Merge "MIPS support to libm, libdl and libthread_db"

* commit 'f7db5ecc4d662da8368f31d57401ca1a39690e40':
  MIPS support to libm, libdl and libthread_db

12 years agoMerge "MIPS support to libm, libdl and libthread_db"
Elliott Hughes [Fri, 4 May 2012 19:00:19 +0000 (12:00 -0700)]
Merge "MIPS support to libm, libdl and libthread_db"

12 years agoMIPS support to libm, libdl and libthread_db
Chris Dearman [Wed, 2 May 2012 00:45:53 +0000 (17:45 -0700)]
MIPS support to libm, libdl and libthread_db

Change-Id: I9106721af7fe0cd45df82976250db0d300a20117
Signed-off-by: Raghu Gandham <raghu@mips.com>
12 years agoam 10579fc4: Merge "Update s_fabsl.c to upstream head."
Elliott Hughes [Tue, 1 May 2012 11:56:57 +0000 (04:56 -0700)]
am 10579fc4: Merge "Update s_fabsl.c to upstream head."

* commit '10579fc43d3ade285eed7318aee062a999f2784d':
  Update s_fabsl.c to upstream head.

12 years agoMerge "Update s_fabsl.c to upstream head."
Elliott Hughes [Tue, 1 May 2012 05:35:02 +0000 (22:35 -0700)]
Merge "Update s_fabsl.c to upstream head."

12 years agoUpdate s_fabsl.c to upstream head.
Elliott Hughes [Mon, 30 Apr 2012 23:12:43 +0000 (16:12 -0700)]
Update s_fabsl.c to upstream head.

Bug: http://code.google.com/p/android/issues/detail?id=29539
Change-Id: I843dcfcbfe49e8e9f43c49aae6ade1edb57a3053

12 years agoam 6baffed2: Add the posix_memalign(3) function to bionic
Ken Sumrall [Fri, 27 Apr 2012 17:49:42 +0000 (10:49 -0700)]
am 6baffed2: Add the posix_memalign(3) function to bionic

* commit '6baffed252d0efbce5a79f356c2f156f4f818996':
  Add the posix_memalign(3) function to bionic

12 years agoAdd the posix_memalign(3) function to bionic
Ken Sumrall [Thu, 15 Dec 2011 04:50:01 +0000 (20:50 -0800)]
Add the posix_memalign(3) function to bionic

The posix_memalign(3) function is very similar to the traditional
memalign(3) function, but with better error reporting and a guarantee
that the memory it allocates can be freed.  In bionic, memalign(3)
allocated memory can be freed, so posix_memalign(3) is just a wrapper
around memalign(3).

Change-Id: I62ee908aa5ba6b887d8446a00d8298d080a6a299

12 years agoam efcf8893: Merge "Update f_accessory.h kernel header" into jb-dev
Mike Lockwood [Thu, 26 Apr 2012 20:12:54 +0000 (13:12 -0700)]
am efcf8893: Merge "Update f_accessory.h kernel header" into jb-dev

* commit 'efcf8893a97df2eb2ecb7aab305998878771d2f2':
  Update f_accessory.h kernel header

12 years agoMerge "Update f_accessory.h kernel header" into jb-dev
Mike Lockwood [Thu, 26 Apr 2012 20:10:25 +0000 (13:10 -0700)]
Merge "Update f_accessory.h kernel header" into jb-dev

12 years agoam b091dd9b: libc: continue to use Android\'s custom linker script
Nick Kralevich [Thu, 26 Apr 2012 18:58:48 +0000 (11:58 -0700)]
am b091dd9b: libc: continue to use Android\'s custom linker script

* commit 'b091dd9bf27a9132c4ac9da55f2f4a87ffe3b59f':
  libc: continue to use Android's custom linker script

12 years agolibc: continue to use Android's custom linker script
Nick Kralevich [Thu, 26 Apr 2012 16:54:48 +0000 (09:54 -0700)]
libc: continue to use Android's custom linker script

By default, Android no longer compiles code using it's custom
linker script /build/core/armelf.xsc. However, this causes
problems for libc. Certain programs linked using older versions
of GOLD expect libc.so to export __exidx_start and __exidx_end.
Removing the custom linker script causes libc.so not to export
those symbols.

For now, continue using the old linker script, until we can
figure out a better solution.

Change-Id: Iaf002afd63a58b848818da24e5a4525620dc4d74

12 years agoUpdate f_accessory.h kernel header
Mike Lockwood [Tue, 17 Apr 2012 17:41:34 +0000 (10:41 -0700)]
Update f_accessory.h kernel header

Change-Id: I29ec4aa4843b9308cbfa412df88e026e8475b715
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoMerge from AOSP
Jean-Baptiste Queru [Wed, 25 Apr 2012 16:29:28 +0000 (09:29 -0700)]
Merge from AOSP

Change-Id: If2e8e4305d10df738cc4ebcf226077f273a48cbf

12 years agoMerge "[MIPS] Fix the warning originating from the kernel header signal.h. This is...
Andrew Hsieh [Wed, 25 Apr 2012 06:44:17 +0000 (23:44 -0700)]
Merge "[MIPS] Fix the warning originating from the kernel header signal.h. This is a clean header generated from the corresponding change in external/kernel-headers repository. (CL 35760)"

12 years ago[MIPS] Fix the warning originating from the kernel header signal.h.
Raghu Gandham [Tue, 24 Apr 2012 01:59:41 +0000 (18:59 -0700)]
[MIPS] Fix the warning originating from the kernel header signal.h.
This is a clean header generated from the corresponding change in
external/kernel-headers repository. (CL 35760)

12 years agolinker: remove STB_LOCAL hack
Nick Kralevich [Mon, 23 Apr 2012 23:50:00 +0000 (16:50 -0700)]
linker: remove STB_LOCAL hack

The ARM static linker wasn't properly handling __exidx_start
and __exidx_end symbols. Now that the static linker has been fixed,
we don't need the dynamic linker to work around this problem.

Change-Id: I041b94903609fafab33663a7d441a5e70b7ffcdd

12 years agoadd linux/sw_sync.h
Erik Gilling [Wed, 18 Apr 2012 22:37:01 +0000 (15:37 -0700)]
add linux/sw_sync.h

Change-Id: I79de18d04b950c21b985d5ebc01cd3306a43d318
Signed-off-by: Erik Gilling <konkers@android.com>
12 years agoadd linux/sync.h
Erik Gilling [Wed, 18 Apr 2012 21:23:04 +0000 (14:23 -0700)]
add linux/sync.h

Change-Id: I38bb9498e18cb2b2e84a97487d4ad1e15fabd9d4
Signed-off-by: Erik Gilling <konkers@android.com>
12 years agoFix segv when unwinding stack past __libc_init.
Evgeniy Stepanov [Wed, 18 Apr 2012 08:57:40 +0000 (12:57 +0400)]
Fix segv when unwinding stack past __libc_init.

This change mirrors cd15bac for statically-linked binaries.

Change-Id: Id870832a50b37f0ef3e79e1ed03ed31390bfc9ef

12 years agoresolved conflicts for merge of 35d592cc to master
Elliott Hughes [Mon, 16 Apr 2012 21:40:26 +0000 (14:40 -0700)]
resolved conflicts for merge of 35d592cc to master

Change-Id: I8184302daf61814d26c837f9920b4e68d96d7f65

12 years agoresolved conflicts for merge of ef987656 to master
Elliott Hughes [Mon, 16 Apr 2012 21:26:43 +0000 (14:26 -0700)]
resolved conflicts for merge of ef987656 to master

Change-Id: I3854de8f4cddaf344444efa6f9da027642a237d9

12 years agoresolved conflicts for merge of 6b8fd054 to master
Elliott Hughes [Mon, 16 Apr 2012 21:16:42 +0000 (14:16 -0700)]
resolved conflicts for merge of 6b8fd054 to master

Change-Id: Ifc5a10d9c2f7764ad80d64cc552aad81d5fbf5eb

12 years agoam ff219e57: am 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"
Elliott Hughes [Mon, 16 Apr 2012 20:15:13 +0000 (13:15 -0700)]
am ff219e57: am 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"

* commit 'ff219e57c0ffe5ac2816f79677ce4f1afa677277':
  bionic: fix NULL parameter failure in getcwd()

12 years agoam 418e647a: Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation."
Elliott Hughes [Mon, 16 Apr 2012 20:12:47 +0000 (13:12 -0700)]
am 418e647a: Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation."

* commit '418e647a8300bb8e62b6b73814a5211152cbaacd':
  libstdc++: Fix x86 thread-safe one-time-construction implementation.

12 years agoam 4994deae: Merge "Bionic: Fix wrong prototype of system call clock_nanosleep"
Elliott Hughes [Mon, 16 Apr 2012 20:12:46 +0000 (13:12 -0700)]
am 4994deae: Merge "Bionic: Fix wrong prototype of system call clock_nanosleep"

* commit '4994deaef51d5fa1ac12e6160b47d9cbe3b2bc43':
  Bionic: Fix wrong prototype of system call clock_nanosleep

12 years agoam 7b8666e6: Merge "bionic: Fix wrong prototype of system call getresuid/getresgid"
Elliott Hughes [Mon, 16 Apr 2012 20:12:46 +0000 (13:12 -0700)]
am 7b8666e6: Merge "bionic: Fix wrong prototype of system call getresuid/getresgid"

* commit '7b8666e683e56549091b86fd7b9c421fd0124dbc':
  bionic: Fix wrong prototype of system call getresuid/getresgid

12 years agoam 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"
Elliott Hughes [Mon, 16 Apr 2012 20:12:45 +0000 (13:12 -0700)]
am 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"

* commit '6435d27f9d45d01fbd15bcc3dcd9617b86b825bb':
  bionic: fix NULL parameter failure in getcwd()

12 years agoMerge "libstdc++: Fix x86 thread-safe one-time-construction implementation."
Elliott Hughes [Mon, 16 Apr 2012 16:13:13 +0000 (09:13 -0700)]
Merge "libstdc++: Fix x86 thread-safe one-time-construction implementation."

12 years agoMerge "Bionic: Fix wrong prototype of system call clock_nanosleep"
Elliott Hughes [Mon, 16 Apr 2012 16:09:04 +0000 (09:09 -0700)]
Merge "Bionic: Fix wrong prototype of system call clock_nanosleep"

12 years agoMerge "bionic: Fix wrong prototype of system call getresuid/getresgid"
Elliott Hughes [Mon, 16 Apr 2012 16:06:22 +0000 (09:06 -0700)]
Merge "bionic: Fix wrong prototype of system call getresuid/getresgid"

12 years agoBionic: Fix wrong prototype of system call clock_nanosleep
Jack Ren [Tue, 17 Apr 2012 03:20:15 +0000 (11:20 +0800)]
Bionic: Fix wrong prototype of system call clock_nanosleep

In bionic/libc/SYSCALLS.TXT, the prototype of system call
clock_nanosleep is incorrect.

According to man page:
int clock_nanosleep(clockid_t clock_id, int flags,
                    const struct timespec *request,
                    struct timespec *remain);

Change-Id: Ic44c6db3d632293aa17998035554eacd664c2d57
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoMerge "bionic: fix NULL parameter failure in getcwd()"
Elliott Hughes [Mon, 16 Apr 2012 15:48:19 +0000 (08:48 -0700)]
Merge "bionic: fix NULL parameter failure in getcwd()"

12 years agobionic: Fix wrong prototype of system call getresuid/getresgid
Jack Ren [Tue, 17 Apr 2012 03:16:18 +0000 (11:16 +0800)]
bionic: Fix wrong prototype of system call getresuid/getresgid

In bionic/libc/SYSCALLS.TXT, the prototypes of system call
getresuid/getresgid are incorrect.

According to man page, they should be:
    int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
    int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);

Change-Id: I676098868bb05a9e1fe45419b234cf397626fdad
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agobionic: fix NULL parameter failure in getcwd()
Jack Ren [Tue, 13 Mar 2012 10:26:28 +0000 (18:26 +0800)]
bionic: fix NULL parameter failure in getcwd()

LTP: getcwd01 failed in LTP

Need to check getcwd parameters, otherwise it will lead to
posix test case to fail.

Change-Id: Ieb673b6dd4ca6481da81c5339dbf7ec0a463f263
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agolibstdc++: Fix x86 thread-safe one-time-construction implementation.
Fengwei Yin [Wed, 28 Mar 2012 09:25:17 +0000 (17:25 +0800)]
libstdc++: Fix x86 thread-safe one-time-construction implementation.

The root of the problem is that the existing implementation is based on the
ARM C++ ABI, which mandates a different guard variable layout than the
Itanium/x86 C++ one.

This patch modifies the implementation in a way that satisfies both ABIs (and
doesn't require changing the toolchains).

Change-Id: I885e9adc7f088b9c0a78355bd752f1e6aeec9f07
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoam cebc8fb0: am 6bc18fa5: Merge "libm: fix invalid result of function remquo/remquof"
Elliott Hughes [Sat, 14 Apr 2012 00:10:06 +0000 (17:10 -0700)]
am cebc8fb0: am 6bc18fa5: Merge "libm: fix invalid result of function remquo/remquof"

* commit 'cebc8fb0862a8e1ecd86f9d09b0a3fca0f0781fa':
  libm: fix invalid result of function remquo/remquof

12 years agoam 6bc18fa5: Merge "libm: fix invalid result of function remquo/remquof"
Elliott Hughes [Sat, 14 Apr 2012 00:07:43 +0000 (17:07 -0700)]
am 6bc18fa5: Merge "libm: fix invalid result of function remquo/remquof"

* commit '6bc18fa58849a4307cf6ddcfd526d9258e8175fc':
  libm: fix invalid result of function remquo/remquof

12 years agoMerge changes I427a1881,I959b6428
Kenny Root [Fri, 13 Apr 2012 23:03:51 +0000 (16:03 -0700)]
Merge changes I427a1881,I959b6428

* changes:
  Add faccessat to syscall list
  Update unistd.h for new syscalls

12 years agoAdd faccessat to syscall list
Kenny Root [Fri, 13 Apr 2012 21:56:25 +0000 (14:56 -0700)]
Add faccessat to syscall list

Change-Id: I427a18811089cb280769ac8da3ed8adc00a65a10

12 years agoMerge "libm: fix invalid result of function remquo/remquof"
Elliott Hughes [Fri, 13 Apr 2012 21:57:59 +0000 (14:57 -0700)]
Merge "libm: fix invalid result of function remquo/remquof"

12 years agoUpdate unistd.h for new syscalls
Kenny Root [Fri, 13 Apr 2012 21:50:14 +0000 (14:50 -0700)]
Update unistd.h for new syscalls

gensyscalls.py run from external/kernel-headers at commit
efab8f3e49f7f36ef0354b0996ecd5f3fa031e52

Change-Id: I959b64280e184655ef8c713aa79f9e23cb1f7df4

12 years agoam 0613dce0: regenerate linux/fb.h
Travis Geiselbrecht [Thu, 12 Apr 2012 23:09:29 +0000 (16:09 -0700)]
am 0613dce0: regenerate linux/fb.h

* commit '0613dce0a7b806d48758cabfb2d638d0ba4dd2bc':
  regenerate linux/fb.h

12 years agoregenerate linux/fb.h
Travis Geiselbrecht [Thu, 12 Apr 2012 21:51:43 +0000 (14:51 -0700)]
regenerate linux/fb.h

Change-Id: Icd8c0f53306a48ffd513378abdf387af21e886a3

12 years agoInitialize TLS before any application code is run.
Evgeniy Stepanov [Thu, 22 Mar 2012 14:01:53 +0000 (18:01 +0400)]
Initialize TLS before any application code is run.

Since e19d702b8e33, dlsym and friends use recursive mutexes that
require the current thread id, which is not available before the libc
constructor. This prevents us from using dlsym() in .preinit_array.

This change moves TLS initialization from libc constructor to the earliest
possible point - immediately after linker itself is relocated. As a result,
pthread_internal_t for the initial thread is available from the start.

As a bonus, values stored in TLS in .preinit_array are not lost when libc is
initialized.

Change-Id: Iee5a710ee000173bff63e924adeb4a4c600c1e2d

12 years agoMerge "Fix segv when unwinding stack past __libc_init."
Elliott Hughes [Thu, 12 Apr 2012 18:52:44 +0000 (11:52 -0700)]
Merge "Fix segv when unwinding stack past __libc_init."

12 years agoMove end of __on_dlclose up
Kenny Root [Wed, 11 Apr 2012 21:16:04 +0000 (14:16 -0700)]
Move end of __on_dlclose up

The END macro was put too far down which made the linker complain about
it. Move up to the end of the code.

Change-Id: Ica71a9c6083b437d2213c7cefe34b0083c78f16b

12 years ago__on_dlclose should be aligned
Kenny Root [Wed, 11 Apr 2012 00:24:24 +0000 (17:24 -0700)]
__on_dlclose should be aligned

Marking segments read-only was pushing the alignment of __on_dlclose by
2 bytes making it unaligned. This change makes sure the ARM code is
aligned to the 4 byte boundary.

Bug: 6313309
Change-Id: Ic2bf475e120dd61225ec19e5d8a9a8b1d0b7f081

12 years agoRevert "linker: remove STB_LOCAL hack"
Nick Kralevich [Tue, 10 Apr 2012 20:42:06 +0000 (13:42 -0700)]
Revert "linker: remove STB_LOCAL hack"

This reverts commit 61ff83475c6f3a3bb05a01ac89d668a331bfe9e9.

This code is harmless, and only applies to the linker, so
there's no harm in keeping it in the tree a little bit longer.
Let's roll this back while we try to figure out the root cause
of bug 6314858.

Bug: 6314858
Change-Id: I9f5ed81d23a7abe273baf792aa8a0a2839ef094c

12 years agoFix segv when unwinding stack past __libc_init.
Evgeniy Stepanov [Tue, 10 Apr 2012 10:10:11 +0000 (14:10 +0400)]
Fix segv when unwinding stack past __libc_init.

This change fixes a segmentation fault in the libc unwinder when it goes
past __libc_init.

Unwind instructions for __libc_init direct it to grab the return address from
the stack frame. Without this change, the unwinder gets a wild address and
looks up further unwind instructions for the routine at that address. If it's
unlucky enough to hit an existing function, it will try to unwind it. Bad
things happen then.

With this change, the return address always points to the _start function,
which does not have unwind instructions associated with it. This stop the
unwind process.

__libc_init never returns, so this does not affect program execution, other
than adding 4 bytes on the main thread stack.

Change-Id: Id58612172e8825c8729cccd081541a13bff96bd0

12 years agolibm: fix invalid result of function remquo/remquof
Jack Ren [Sat, 19 Nov 2011 07:52:08 +0000 (15:52 +0800)]
libm: fix invalid result of function remquo/remquof

Currently we will get the wrong result as follows:
remquof(0x7bb33336, 0x63000000) = -671088640, 0x00000000
remquo(0xbff0000000000003, 0x3ff0000000000003) = 1, 0x8000000000000000
remquo(0x9120000000000001, 0x0000000000000005) = -1288490188, 0x0000000000000004
while the correct one should be:
remquof(0x7bb33336, 0x63000000) = 1476395008, 0x00000000
remquo(0xbff0000000000003, 0x3ff0000000000003) = -1, 0x8000000000000000
remquo(0x9120000000000001, 0x0000000000000005) = -1288490189, 0x0000000000000001

Fixed in this patch.

Change-Id: I540b348cd10a539f3b39b1753945c893c4c7ec46
Signed-off-by: Jingwei Zhang <jingwei.zhang@intel.com>
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
12 years agoMerge "linker: remove STB_LOCAL hack"
Nick Kralevich [Mon, 9 Apr 2012 20:41:14 +0000 (13:41 -0700)]
Merge "linker: remove STB_LOCAL hack"

12 years agolinker: remove STB_LOCAL hack
Nick Kralevich [Mon, 9 Apr 2012 19:50:17 +0000 (12:50 -0700)]
linker: remove STB_LOCAL hack

The ARM static linker wasn't properly handling __exidx_start
and __exidx_end symbols. Now that the static linker has been fixed,
we don't need the dynamic linker to work around this problem.

Change-Id: Ic567122b6c7746cc016795e2befba2c6bd7c0478

12 years agoMerge "Update linux/input.h to version 3.4."
Jeff Brown [Mon, 9 Apr 2012 18:24:27 +0000 (11:24 -0700)]
Merge "Update linux/input.h to version 3.4."

12 years agoUpdate linux/input.h to version 3.4.
Jeff Brown [Sat, 7 Apr 2012 02:24:35 +0000 (19:24 -0700)]
Update linux/input.h to version 3.4.

Bug: 6292993
Change-Id: Ic7628068df6c8de9cb3711a4540d51365b96ebdb

12 years agolibc/kernel: update cleaned v4l2 header
Dima Zavin [Mon, 2 Apr 2012 19:57:03 +0000 (12:57 -0700)]
libc/kernel: update cleaned v4l2 header

Change-Id: Ib3747b45eb1e4095cca3de6d7692387953e8c4a7
Signed-off-by: Dima Zavin <dima@android.com>
12 years agoMerge "libc/kernel-headers: Auto generated files for netfilter/xt_IDLETIMER"
JP Abgrall [Fri, 6 Apr 2012 03:36:36 +0000 (20:36 -0700)]
Merge "libc/kernel-headers: Auto generated files for netfilter/xt_IDLETIMER"

12 years agolibc/kernel-headers: Auto generated files for netfilter/xt_IDLETIMER
Ashish Sharma [Fri, 6 Apr 2012 02:50:42 +0000 (19:50 -0700)]
libc/kernel-headers: Auto generated files for netfilter/xt_IDLETIMER

From Change I526b5fce: Add NETLINK_IDLETIMER msg type and include the corresponding header file.

Change-Id: I24bffc11394c8664e4d7d7f439b0600545f07536
Signed-off-by: Ashish Sharma <ashishsharma@google.com>
12 years agolinker: surround "debug_verbosity" by "#if LINKER_DEBUG"
Nick Kralevich [Wed, 4 Apr 2012 19:43:32 +0000 (12:43 -0700)]
linker: surround "debug_verbosity" by "#if LINKER_DEBUG"

Avoid executing useless code when we're not compiled
with debugging support.

Change-Id: Iea1821b241acacdf65d1a91d743356058dfef273

12 years agolinker: enable -fvisibility=hidden
Nick Kralevich [Wed, 4 Apr 2012 17:18:27 +0000 (10:18 -0700)]
linker: enable -fvisibility=hidden

Compile the linker with -fvisibility=hidden. This reduces the number
of symbols that show up in the .dynsym section of the linker.
These symbols are never exported to other applications.

In particular, this fixes a problem with setting -DLINKER_DEBUG=1
introduced in 468319ce4f3f7383d788b76c09cda2a405311f36.
Because the symbols "debug_verbosity" and "format_log" have not been
resolved before the linker links itself, any attempt to call
PRINT / INFO / TRACE / WARN / ERROR will result in a segfault.
This change allows the static linker to produce a relative reference
to these symbols rather than relying on relocation.

This also has a nice side effect of making the linker slightly smaller
and slightly more optimized.

The following symbols no longer in the .dynsym section of the linker
after this change:

-addr_to_name
-call_constructors_recursi
-calloc
-debugger_init
-debugger_signal_handler
-debug_verbosity
-dladdr
-dlclose
-dlerror
-dl_lock
-dlopen
-dlsym
-dl_unwind_find_exidx
-find_containing_library
-find_containing_symbol
-find_library
-format_buffer
-free
-libdl_info
-linker_env_get
-linker_env_init
-linker_env_secure
-linker_env_unset
-linker_get_error
-__linker_init
-lookup
-lookup_in_library
-malloc
-notify_gdb_of_libraries
-notify_gdb_of_load
-notify_gdb_of_unload
-realloc
-rtld_db_dlactivity
-unload_library
-vsnprintf

Bug: 5827809
Change-Id: I5e8cd7dcf48c1d6831a970a67f63f24916c5e437

12 years agoMerge remote-tracking branch 'goog/ics-aah'
Mike Lockwood [Tue, 3 Apr 2012 18:35:33 +0000 (11:35 -0700)]
Merge remote-tracking branch 'goog/ics-aah'

12 years agoam fdb11929: am b88f810d: Merge "Update to tzdata2012c."
Elliott Hughes [Mon, 2 Apr 2012 23:09:36 +0000 (16:09 -0700)]
am fdb11929: am b88f810d: Merge "Update to tzdata2012c."

* commit 'fdb119297ac421e2fc2ec096a6d5370b81938de8':
  Update to tzdata2012c.

12 years agoam b88f810d: Merge "Update to tzdata2012c."
Elliott Hughes [Mon, 2 Apr 2012 23:07:46 +0000 (16:07 -0700)]
am b88f810d: Merge "Update to tzdata2012c."

* commit 'b88f810d585a1736a1759c2c22e9f4999441ae00':
  Update to tzdata2012c.

12 years agoMerge "Update to tzdata2012c."
Elliott Hughes [Mon, 2 Apr 2012 17:25:43 +0000 (10:25 -0700)]
Merge "Update to tzdata2012c."

12 years agoUpdate to tzdata2012c.
Elliott Hughes [Mon, 2 Apr 2012 14:35:13 +0000 (07:35 -0700)]
Update to tzdata2012c.

From the release notes:

       africa
               Summer time changes for Morocco (to start late April 2012)

       asia
               Changes for 2012 for Gaza & the West Bank (Hebron) and Syria

       northamerica
               Haiti following US/Canada rules for 2012 (and we're assuming,
               for now anyway, for the future).

Also include a change made internally to the 'generate' script as part of
the tzdata2011m update that apparently never made it to AOSP; the original
checkin comment for which was:

    Update to tzdata2011m.

    Fixes for Europe/Tiraspol (Moldova) and all four Ukrainian zones.

    Also show the MD5 of the downloaded data, for comparison against the MD5
    given in the announcement mails. (There's a plan to move to proper signing,
    but that's not implemented on their end yet.)

(I'm repeating the tzdata change for the convenience of anyone grepping the
log, since the 2012 tzdata releases also contain the 2011m changes; 2011m
is the only missing release I noticed.)

Change-Id: I9a2e530b3a8ea88e3375334a12376e3d8526f267

12 years agoam cd834618: am 63b14755: Merge "libc/x86: ensure the stack 16-byte aligned when...
Elliott Hughes [Sat, 31 Mar 2012 05:16:02 +0000 (22:16 -0700)]
am cd834618: am 63b14755: Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"

* commit 'cd834618c4752b61d54ff4005a8baa8219b822e4':
  libc/x86: ensure the stack 16-byte aligned when tasks created

12 years agoam 63b14755: Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"
Elliott Hughes [Fri, 30 Mar 2012 22:53:19 +0000 (15:53 -0700)]
am 63b14755: Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"

* commit '63b14755512d515762cbe3ad8544c561a576f32e':
  libc/x86: ensure the stack 16-byte aligned when tasks created

12 years agoMerge "libc/x86: ensure the stack 16-byte aligned when tasks created"
Elliott Hughes [Fri, 30 Mar 2012 20:42:42 +0000 (13:42 -0700)]
Merge "libc/x86: ensure the stack 16-byte aligned when tasks created"

12 years agoRevert "libc/kernel: Add rules to autogenerate device specific kernel headers"
Dima Zavin [Fri, 30 Mar 2012 17:21:16 +0000 (10:21 -0700)]
Revert "libc/kernel: Add rules to autogenerate device specific kernel headers"

This reverts commit 884147c7d0b1b6571256feb11e12d893432625b2.

Change-Id: I09723858ac961f3e1155791aa5c54d5d3abfbd36
Signed-off-by: Dima Zavin <dima@android.com>
12 years agoam ea76f414: am d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers are generat...
Elliott Hughes [Wed, 28 Mar 2012 00:58:57 +0000 (17:58 -0700)]
am ea76f414: am d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."

* commit 'ea76f4147825cc39d9aa91230cd863ed29f28e27':
  [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.

12 years agoam d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running...
Elliott Hughes [Wed, 28 Mar 2012 00:57:41 +0000 (17:57 -0700)]
am d509f9cc: am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."

* commit 'd509f9ccbba6e1dd53acfd7425bfc06d6b3f8693':
  [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.

12 years agoam 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel...
Elliott Hughes [Wed, 28 Mar 2012 00:53:35 +0000 (17:53 -0700)]
am 09ce7749: Merge "[MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture."

* commit '09ce7749d74733b28d4fa7a1d36457cb366cc5da':
  [MIPS] Clean Kernel headers are generated by running libc/kernel/tools/update_all.py script. This patch ignores any changes to libc/kernel directory not related to MIPS architecture.