Add ip6t_get_target() to kernel_known_generic_statics in
libc/kernel/tools/defaults.py to be able to build ip6tables.
Change-Id: Iadb885db3faa85b2d0070dc2e0ac493af6e62bb6
Merge commit 'fa5755ae980b6f4ac5df37b263ba20f472db31ca' into gingerbread-plus-aosp
* commit 'fa5755ae980b6f4ac5df37b263ba20f472db31ca':
Add clean headers for 7x30 video codec.
Merge commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760' into gingerbread-plus-aosp
* commit '50ace4fec5e8cb5afcbc656a4556fa528adfd760':
Remove compiler warnings when building Bionic.
Merge commit 'e1a739ec38a39fea9e66038dfc7cea364cb6a256'
* commit 'e1a739ec38a39fea9e66038dfc7cea364cb6a256':
Allow static C++ destructors to be properly called on dlclose().
Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.
Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
Merge commit '6a9b888d7c4b246f6f66360789c72b754ff85021' into gingerbread-plus-aosp
* commit '6a9b888d7c4b246f6f66360789c72b754ff85021':
Allow static C++ destructors to be properly called on dlclose().
With this patch, _and_ an upcoming build/ patch, the destruction
of static C++ objects contained in shared libraries will happen
properly when dlclose() is called.
Note that this change introduces crtbegin_so.S and crtend_so.S which
are currently ignored by the build system.
+ move definition of __dso_handle to the right place
(before that, all shared libraries used the __dso_handle
global variable from the C library).
Note that we keep a 'weak' __dso_handle in aeabi.c to avoid
breaking the build until the next patch to build/core/combo/
appears. We will be able to remove that later.
+ move bionic/aeabi.c to arch-arm/bionic/ (its proper location)
Change-Id: Ie771aa204e3acbdf02fd30ebd4150373a1398f39
NOTE: The NDK will need to be modified to enable this feature in
the shared libraries that are generated through it.
When calling sysconf with _SC_NPROCESSORS_ONLN, the value one (1) was
returned on systems with two or more cores, since '/proc/stat' was
incorrectly parsed.
The function line_parser_getc (LineParser* p) read 128 characters of
input for each invocation.
The proper and probably aimed for behavior is to read 128 characters
at the first call, then for each subsequent call only return the next
buffered character until a new read is needed and only then read
another 128 characters.
Due to a flipped comparison between the two variables in_len and
in_pos that track the number of bytes of data read into the input
buffer and how much of it has been parsed, a new group of 128
characters were read at almost every call to line_parser_getc,
overwriting the still unhandled bytes from the previous call to
read. This caused the lines to be read to be sampled more than parsed.
Change-Id: I93eec3c8c9b9f19ef798748579d0977111b5c0bb
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
Merge commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4' into gingerbread-plus-aosp
* commit '6a09cfd9f916e3a60de707ff0806cdeb143d77a4':
wchar.h: improve wchar_t support in Bionic
We simply copy the stuff we need from cutils headers.
A future patch will change cutils to include the private <bionic_atomic_inline.h>
Change-Id: Ib6fd9a03bc9e337ce867bd606dc94c2b4438480a
bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)':
bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter]
By adding __attribute((unused)) to __fd, the warning is gone, and this
attribute is compatible with gcc-4.4.0, gcc-4.3.1 gcc-4.2.1.
There is no any side effect.
Change-Id: I385f0f4da1013ffd1499e391eac9123aafe1f7a5
Update ARM atomic ops to use LDREX/STREX. Stripped out #if 0 chunk.
Insert explicit memory barriers in pthread and semaphore code.
For bug 2721865.
Change-Id: I0f153b797753a655702d8be41679273d1d5d6ae7
bionic/libc/include/../include/stdlib.h: In function 'int grantpt(int)':
bionic/libc/include/../include/stdlib.h:138:23: warning: parameter '__fd' set but not used [-Wunused-but-set-parameter]
By adding __attribute((unused)) to __fd, the warning is gone, and this
attribute is compatible with gcc-4.4.0, gcc-4.3.1 gcc-4.2.1.
There is no any side effect.
Change-Id: Id9d2b0aeefdd9c37132da0f00c48387f7d897e83
Added an underscore to _ARM_HAVE_LDREX_STREX to make it match the others.
Added __ARM_HAVE_DMB and __ARM_HAVE_LDREXD when appropriate.
Fixed some typos.
Change-Id: I2f55febcff4aeb7de572a514fb2cd2f820dca27c
... so that each cloned process at the kernel level can be named
independently. Tools like 'top' can display the CPU/memory statistics
for each process's thread if "Show Threads" mode is on.
With this function in place, we can convert dalvik/Thread.c setThreadName()
function over this function. This feature ought to be provided by the
underlying C library and not coded directly in Dalvik.
Change-Id: Ifa997665dbaa114e0b126f8c667708be9a4137fd
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
GDB looks for specific opcode sequences when trying to recognize a stack
frame as a signal trampoline. The sequences it looks for happen to be those
created when SA_RESTORER is set, since glibc always sets a restorer. This
patch does the same here, so that the trampolines can be correctly identified.
Change-Id: I0ac574a68818cb24d939c3527f3aaeb04b853d04
... by removing extraneous NULL check, as free() already does it.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: I0445f35c7ad0a049a0e4aee1fbe002ed2f13b94b
... by removing unneeded NULL check, as free() already does it.
By the way, we don't need to set a stack variable back to NULL.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: Id90eb8f042b5c922c5ff139b11ff8366fb404566
... by removing unneeded NULL check, as free() already does it.
By the way, we don't need to set a stack variable back to NULL.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Change-Id: Id1f72e872f73366dddcea4abc75885a3d9a318c6
... by checking most probable condition first (elements do differ)
Change-Id: I424eab9c32a6d9eb82b686ca04025ec8c9097035
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Typo assigned prefixlen1 twice instead of to the two different variables
for comparison and difference computation.
Change-Id: I6631b8269ca6aae264c8d7d414127b756838df96
Now that the system properly uses shared condvars when needed, we
can enable the use of private futexes for them too.
Change-Id: Icf8351fc0a2309f764cba45c65bc3af047720cdf
This does not change the implementation of conditional variables
since we're waiting for other system components to properly use
pthread_condattr_init/setpshared before that.
Also remove an obsolete x86 source file.
Change-Id: Ia3e3fbac35b87a534fb04d4381c3c66b975bc8f7
Note that this does not change the implementation of conditional variables
which still use shared futexes, independent on the flags being selected.
This will be fixed in a later patch, once our system is modified to use
pthread_condattr_setpshared(attr, PTHREAD_PROCESS_SHARED) properly.
Change-Id: I935de50964cd41f97a13dbfd6626d3407b0406c3
dladdr() is a GNU extension function, which allows the caller to retrieve
symbol information for a specified memory address. It is useful for things
like generating backtrace information at runtime.
Change-Id: I3a1def1a6c9c666d93e1e97b7d260dfa5b9b79a9
Private futexes are a recent kernel addition: faster futexes that cannot be
shared between processes. This patch uses them by default, unless the PROCESS_SHARED
attribute flag is used when creating a mutex and/or conditional variable.
Also introduces pthread_condattr_init/destroy/setpshared/getpshared.
Change-Id: I3a0e2116f467072b046524cb5babc00e41057a53
To avoid introducing NULL checks everytime a Bigint computation
is performed, introduce a special value (BIGINT_INVALID) and only
check for it when absolutely needed (which means when the code
needs to access the Bigint's internal structure fields).
Change-Id: Ie3954523b0985b6a8cb62340802d8dcf63cbf16f
The problem was that the 'defdname' field of res_state structure
was not properly initialized in __res_vinit(). This field is used
to store the default domain name, which is normally build from
calling gethostname() (see line 549 of res_init.c).
Unfortunately, in the typical Android case, gethostname() returns
an error (the hostname is configured) and a random stack string is
used later to build the DNS search list (see lines 556+ in res_init.c)
For the sake of illustration, let's say the search list is set to
a random value like 'xWLK'.
The end result is that when trying to result an unknown domain name
(e.g. 'www.ptn'), the query fails then the resolver tries to make a
new query with the DNS search list path(s) appended (e.g. 'www.ptn.xWLK').
The patch simply initializes 'defdname' to an empty string to avoid
this when the net.dns.search system property is not set.
Also contains whitespace/formatting fixes
Any of the setuid functions now updates /acct/uid/ with its own tid
before changing users. This is so we can properly account for cpu time
per uid.
Change-Id: I34186cf4d5228cac8439e582a9e26c01ef3011e4
Signed-off-by: Mike Chan <mike@android.com>
Java changes required not to mess up the ordering from bionic will arrive in a
later commit.) In particular, this will give us more correct behavior when on a
6to4 network, in that IPv4 will usually be preferred over 6to4.
Most of RFC 3484 is implemented -- what's not is rule 3 (avoid deprecated
addresses), 4 (prefer home addresses) and 7 (prefer native transport) as they
require low-level access to the kernel routing table via netlink. (glibc also
started out this way, and these rules are primarily useful in pretty obscure
circumstances, so we should be fine for the time being.)
Also, rule 9 (use longest matching prefix) has been modified so it does not try
to sort IPv4 addresses; given current IPv4 addressing practice these rules are
pretty much meaningless. Finally, I've added support for Teredo as a separate
label, with slightly lower preference than 6to4. (Vista puts the preference
below IPv4 by default. glibc puts the preference together with non-tunneled
IPv6.)
Note that this patch removes support for the "sortlist" directive in
resolv.conf; I've never seen it in actual use, it's irrelevant for Android
(since we don't use resolv.conf anyway), and it's not clear how it would be
implemented alongside RFC 3484.
On ARM EABI, 64-bit function parameters must be aligned
to an even/odd register pair. The weird way these stubs
were written (using separate lo/hi parameters) prevented
this alignment from being enforced by the compiler.
It decreases code size:
text data bss dec hex filename
161 0 0 161 a1 strndup-BEFORE.o
153 0 0 153 99 strndup-AFTER.o
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Only provide an implementation for ARM at the moment, since
it requires specific assembly fragments (the standard syscall
stubs cannot be used because the child returns in a different
stack).
The gHardy man pages specify the return type of ptsname_r to be char*, but the
return value to be 0 on success, negative on error and the gHardy stdlib.h
defines extern int ptsname_r(...).
Busybox telnetd fails to run successfully without this change.
Merge commit 'f197147a787d7415e6e0a1bad15566836c55befb'
* commit 'f197147a787d7415e6e0a1bad15566836c55befb':
Revert "Add qsort_r() implementation to the C library."
Merge commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e'
* commit 'be71c8142d4225dd9af4742ec050f30fcbc2aa5e':
Add qsort_r() implementation to the C library.
Merge commit 'ca07064c9ebd8523ed88fa09e97feaaafb7e9c15' into eclair-mr2-plus-aosp
* commit 'ca07064c9ebd8523ed88fa09e97feaaafb7e9c15':
Revert "Add qsort_r() implementation to the C library."
Merge commit '5f53a18204ec991f5a77872806eeaa185936aa8c' into eclair-plus-aosp
* commit '5f53a18204ec991f5a77872806eeaa185936aa8c':
Revert "Add qsort_r() implementation to the C library."
Merge commit '5f53a18204ec991f5a77872806eeaa185936aa8c' into eclair-mr2
* commit '5f53a18204ec991f5a77872806eeaa185936aa8c':
Revert "Add qsort_r() implementation to the C library."
Merge commit '20b3097d4cc225d948dac38e778a9d3b3b1549db' into eclair-mr2-plus-aosp
* commit '20b3097d4cc225d948dac38e778a9d3b3b1549db':
Add qsort_r() implementation to the C library.
This reverts commit 754c178ae5.
Turns out we don't need it afterall (needed a stable sort anyways).
So, we'll make that change in the dev branch instead.
Merge commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989' into eclair-mr2
* commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989':
Add qsort_r() implementation to the C library.
Merge commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989' into eclair-plus-aosp
* commit '754c178ae551aedcbbfd3bfd1c1c3b710d9ad989':
Add qsort_r() implementation to the C library.
NOTE: This replaces qsort.c with the FreeBSD version. While
the patch changes the source, it should not alter the
implementation that should use the exact same algorithm.
log_channel_t contains fd member, which is file descriptor for
exact logging channel. change cc05d12716
lacks initialization of this member in __write_to_log_init(), thus
logging code is not working, although not crashable.
Additional details may be found in comments here:
http://review.source.android.com/5617
The file descriptor wasn't getting set, so the writev() call was
silently failing.
There's a parallel implementation over in system/core/liblog, but it's
still using the old approach and didn't have this problem.
Merge commit 'ae77aae80cb78b33f32e65c43a473d5e297b866b'
* commit 'ae77aae80cb78b33f32e65c43a473d5e297b866b':
Rebuild the time zone data files in 32-bit format instead of 64-bit.
Merge commit '07401a681f7530a8126fb0fd07a097828337b30a' into eclair-mr2-plus-aosp
* commit '07401a681f7530a8126fb0fd07a097828337b30a':
Rebuild the time zone data files in 32-bit format instead of 64-bit.
Merge commit 'cd5df2d92c3adeac41e27aab5ba0f999c753c4c4' into eclair-mr2
* commit 'cd5df2d92c3adeac41e27aab5ba0f999c753c4c4':
Rebuild the time zone data files in 32-bit format instead of 64-bit.
Merge commit 'cd5df2d92c3adeac41e27aab5ba0f999c753c4c4' into eclair-plus-aosp
* commit 'cd5df2d92c3adeac41e27aab5ba0f999c753c4c4':
Rebuild the time zone data files in 32-bit format instead of 64-bit.
Merge commit 'a5d9651368779ae054f4184c5881566fdee85003'
* commit 'a5d9651368779ae054f4184c5881566fdee85003':
Correct the raw offsets in the time zone index for a few zones.
Merge commit '8d7c6953373b4e2c6f49dfff741bf0da09030760' into eclair-mr2-plus-aosp
* commit '8d7c6953373b4e2c6f49dfff741bf0da09030760':
Correct the raw offsets in the time zone index for a few zones.
Merge commit '7e6178998507f993eedf6bec726b0c28881f0485' into eclair-plus-aosp
* commit '7e6178998507f993eedf6bec726b0c28881f0485':
Correct the raw offsets in the time zone index for a few zones.
Merge commit '7e6178998507f993eedf6bec726b0c28881f0485' into eclair-mr2
* commit '7e6178998507f993eedf6bec726b0c28881f0485':
Correct the raw offsets in the time zone index for a few zones.
ZoneCompactor was using the system time zone database to get the offsets
instead of using the data it was compiling, so for newly added or recently
changed zones the index could be inconsistent with the data.
Affected zones: San_Luis, Casey, Davis, Mawson, Kathmandu, Novokuznetsk
Wrapped declarations in time64.h with __BEGIN_DECLS/__END_DECLS so that
the prototypes are correctly identified as extern C.
Change-Id: I253453307831c929a6c7174b28b48bceef946fed
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit '9cb69cf4dc8962204715a7662c7d0e778a7ee113'
* commit '9cb69cf4dc8962204715a7662c7d0e778a7ee113':
Update zoneinfo time zone data to version 2009s
Merge commit '25a3a3ea8cb234bead6d80a71823713b80acfea8' into eclair-mr2-plus-aosp
* commit '25a3a3ea8cb234bead6d80a71823713b80acfea8':
Update zoneinfo time zone data to version 2009s
Merge commit 'a6083b7768a2d1efc52805ff7ce049866186c744' into eclair-plus-aosp
* commit 'a6083b7768a2d1efc52805ff7ce049866186c744':
Update zoneinfo time zone data to version 2009s
Merge commit 'a6083b7768a2d1efc52805ff7ce049866186c744' into eclair-mr2
* commit 'a6083b7768a2d1efc52805ff7ce049866186c744':
Update zoneinfo time zone data to version 2009s
Merge commit 'fdfa16776ca8f33f671cbac5dd9fa8bd761e16a8'
* commit 'fdfa16776ca8f33f671cbac5dd9fa8bd761e16a8':
Split libc_debug.so into two .so modules loaded on demand from libc.so
Merge commit '362b2aabee2dd04e04a3ad9c09f0ad0212569be4' into eclair-mr2-plus-aosp
* commit '362b2aabee2dd04e04a3ad9c09f0ad0212569be4':
Split libc_debug.so into two .so modules loaded on demand from libc.so
This change is intended to eliminate need to replace libc.so with libc_debug.so in order to enablememory allocation debugging.
This is also the first step towards implementing extended memoryallocation debugging using emulator's capabilities in monitoring memory access.
Merge commit '83362689f5b1f6393d376d242fe29541b63ead2d'
* commit '83362689f5b1f6393d376d242fe29541b63ead2d':
added and modified linker to support SuperH architecture
Add the BSD sys_signame array.
added and modified bionic code to support SuperH architecture
Merge commit '96bbbe21778fc3f4a932822c2436238d6ce5721b' into eclair-plus-aosp
* commit '96bbbe21778fc3f4a932822c2436238d6ce5721b':
Wrap ARM abort() to improve stack trace.
The code generated for Thumb and Thumb2 targets has different handling
for abort(). Because abort() is "noreturn", it doesn't need to preserve
the callee-save registers. The Thumb2 version trashes LR and makes it
impossible to figure out who called abort().
This inserts a trivial stub function; net effect is stack traces are
reasonable after an abort().
For bug 2191452.
Eclair branch Dr. No approved by: hiroshi
Merge commit '581f43056b594429b3df4678d87989c93d8f81d2'
* commit '581f43056b594429b3df4678d87989c93d8f81d2':
use local symbols in memset so it doesn't screw up profiling
Merge commit '76ef331cd6967ca8f5af779d25c8b634f8cdd2b6' into eclair-mr2-plus-aosp
* commit '76ef331cd6967ca8f5af779d25c8b634f8cdd2b6':
use local symbols in memset so it doesn't screw up profiling
Merge commit '7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c' into eclair-plus-aosp
* commit '7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c':
use local symbols in memset so it doesn't screw up profiling
Merge commit '7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c' into eclair-mr2
* commit '7e7d6c48a064af82f0ec39f47b9eb803a6e1df4c':
use local symbols in memset so it doesn't screw up profiling
Merge commit '5f32207a3db0bea3ca1c7f4b2b563c11b895f276' into eclair-mr2-plus-aosp
* commit '5f32207a3db0bea3ca1c7f4b2b563c11b895f276':
Wrap ARM abort() to improve stack trace.
The code generated for Thumb and Thumb2 targets has different handling
for abort(). Because abort() is "noreturn", it doesn't need to preserve
the callee-save registers. The Thumb2 version trashes LR and makes it
impossible to figure out who called abort().
This inserts a trivial stub function; net effect is stack traces are
reasonable after an abort().
For bug 2191452.
Merge commit '73981476a389847e8537cca37503c43e107fadc9'
* commit '73981476a389847e8537cca37503c43e107fadc9':
Fill l_ld of linkmaps with value from soinfo::dynamic.
modified kernel headers re-generate tools to support SuperH architecture
added syscalls for SuperH which automatically generate by gensyscalls.py
Merge commit '5c32826841460294cfba98ff713b4804512bacd1' into eclair-plus-aosp
* commit '5c32826841460294cfba98ff713b4804512bacd1':
libc: kernel: add linux/msm_q6venc.h kernel include for qsd8k h/w video encode
the issue here is that abort() can be called from anywhere, in particular
from malloc or free. When we try to use the debug_log functions, these
can end up calling into some code (like malloc/free) that called abort()
in the first place and end up in an infinite recursion loop.
Do not submit this patch before the one that modifies the Android emulator to
work-around a weird ARMv7 emulation issue. This is done to temporarily re-allow
the -user builds needed for QA.
This is required to work-around some corny bugs in ARMv7 emulation.
The emulation itself is required to run the dex pre-optimization pass
for -user builds.
Merge commit '7a9e06fa7e4e533074cde314f25dff3024f34a5d' into eclair-plus-aosp
* commit '7a9e06fa7e4e533074cde314f25dff3024f34a5d':
Fix ABI breakage in libc.so and libm.so between 1.6 and Eclair.
372 MB/s for large transfers, 440 MB/s for smaller ones down to 1KB. 130 MB/s for very small transfers ( < 32 bytes )
Performance is similar with non-congruent buffers.
Merge commit 'bc10cd2900cdb7fed077163b6a33e0f8572b2b19' into eclair-plus-aosp
* commit 'bc10cd2900cdb7fed077163b6a33e0f8572b2b19':
Fix a typo that resulted in a crash in the boot sequence
This is used to perform a mutex lock for a given amount of
milliseconds before giving up. Using the _np prefix since this
is absolutely not portable.
Also remove a compiler warning in pthread_attr_getstackaddr
For performance reasons, we don't call the kernel helper. Instead, we directly
access the TLS register on ARMv6 and higher. For ARMv5TE, keep using the hard-coded
address populated by the kernel on each task switch.
NOTE: Since we don't call the kernel helper, this must precisely match your
kernel configuration. This is controlled by setting the ARCH_ARM_HAVE_TLS_REGISTER
variable to 'true' in your board configuration file.
the TLS access functions to use the kernel helper.
This Fix is verified on ST Ericsson's U8500 platform and Submitted on behalf of a third-party:
Surinder-pal SINGH from STMicroelectronics.
Compiling with -std=c99 defines __STRICT_ANSI__, but the 64 bit types
and type macros should still be defined in this case.
This helps compiling third party code that needs -std=c99 with the NDK.
Merge commit '4e57cf3f8c0b696f117579c8165b13c8d32b9b5d' into eclair-plus-aosp
* commit '4e57cf3f8c0b696f117579c8165b13c8d32b9b5d':
Fix an infinite loop in time2sub.