Commit graph

7984 commits

Author SHA1 Message Date
Colin Cross
acfc63760e Revert "HACK: linker: check for handle==0xffffffff on LP64"
This reverts commit 346fea0805.

Change-Id: Id3fd79451e4218e68e39ce22f21408cbf93255ee
2014-06-16 15:44:20 -07:00
Christopher Ferris
d10d3acd45 Merge "Move jemalloc due to whole_static_library bug." 2014-06-16 15:49:03 +00:00
Christopher Ferris
3a37576d4b Move jemalloc due to whole_static_library bug.
Rename jemalloc.cpp to jemalloc_wrapper.cpp to avoid problems with
the libc library having two jemalloc.o files that clobber each other.

Change-Id: I9a2d966dbf414b1367ee0ef1f0d73fca6f25b518
2014-06-16 17:13:09 -07:00
Dan Albert
a217a0cdb3 Merge "libc: Fix 'index' symbol export." 2014-06-16 15:34:52 +00:00
David 'Digit' Turner
891dedb935 libc: Fix 'index' symbol export.
The C library didn't export the 'index' symbol, but its C++ name-mangling
instead, which broke the ABI and prevented some applications from loading
properly.

The main reason was that the implementation under bionic/index.cpp relied
on the declaration to specify that the function has C linkage.

However, the declaration for index() was removed from both <string.h>
and <strings.h> in a recent patch, which made the compiler think it was
ok to compile the function with C++ linkage instead!

This patch does the following:

- Move index() definition to bionic/ndk_cruft.cpp and ensure it uses
  C linkage.

  Note that this removes index() from the 64-bit library entirely, this
  is intentional and will break source compatibility. Simply replacing
  an index() call with the equivalent strchr() should be enough to fix
  this in third-party code.

- Remove bionic/index.cpp from the tree and build files.

- Remove x86 assembly implementation from arch-x86/ to avoid conflict
  with the one in ndk_cruft.cpp

BUG=15606653

Change-Id: I816b589f69c8f8a6511f6be6195d20cf1c4e8123
2014-06-16 13:10:20 -07:00
Dan Albert
4fb0d4fb31 Merge "Revert "Revert "Remove ftime from bionic LP64""" 2014-06-16 19:18:38 +00:00
Dan Albert
ac6467587e Revert "Revert "Remove ftime from bionic LP64""
This reverts commit 0921204660.

Change-Id: I749af8d7d429cda9f9d09a75bd30df54e6b1dd65
2014-06-16 12:32:38 -07:00
Dan Albert
9a3ad98fd6 Merge "Removes getdtablesize(3) from LP64." 2014-06-16 19:16:50 +00:00
Dan Albert
462abab12b Removes getdtablesize(3) from LP64.
getdtablesize(3) was removed fro POSIX 2004. Keep the symbol around in LP32 for
binary compatibility, but remove the declaration from unistd.h.

Bug: 13935372
Change-Id: I1f96cd290bf9176f922dad58bd5a7ab2cae7ef0f
2014-06-16 10:12:37 -07:00
Qiming Shi
0069f31066 Add <linux/tty.h> to libc/include/sys/ioctl.h
This is the change to export the tty ldisc definitions (like N_TTY)
from Linux uapi kernel header. So bionic is compatbile with glibc
which has its own tty ldisc definition exported through ioctl.h

Change-Id: I44e4c7cc2eba31549e9c9c75f74961a949d4a696
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
Signed-off-by: Yin, Fengwei <fengwei.yin@intel.com>
2014-06-13 16:39:39 +08:00
Elliott Hughes
0f690d9eda Merge "Fix x86-64 libvpx build." 2014-06-12 21:07:49 +00:00
Elliott Hughes
e61919ad11 Fix x86-64 libvpx build.
This is now fixed upstream, but we need to wait for it to come back down
via chromium...

Bug: 15598056
Change-Id: I08f1be4296c391cfc1616a5ff0815be14071594a
2014-06-12 20:07:47 -07:00
Shu Zhang
0ef7a8fd31 add 64-bit bionic implementation for denver arch
Add 64-bit bionic implementation for denver. memcpy/memset are
denver-specific optimized. Use generic version of other routines.

Change-Id: I44a830e07b82b2986001d73d1540b4080aaa839b
2014-06-12 15:08:27 +08:00
Dan Albert
72dc1c22dc Merge "Revert "Backing this one out since the counterpart needs to be sent upstream."" 2014-06-12 05:34:11 +00:00
Dan Albert
e5fdaa4f9d Revert "Backing this one out since the counterpart needs to be sent upstream."
This reverts commit a04d2bc28e.

Change-Id: I1b49165ca5d4bafdba7948818256a6167a363aca
2014-06-14 01:04:31 +00:00
Dan Albert
a04d2bc28e Backing this one out since the counterpart needs to be sent upstream.
This reverts commit 5ee320dd35.

Change-Id: I1a9c6b06c3aca595f01c629f7649be743dc48e77
2014-06-14 00:51:14 +00:00
Dan Albert
5ee320dd35 Hides valloc(3)/pvalloc(3) on LP64.
These were removed from POSIX 2004. Hides the header declarations for all
targets, and hides the symbols for LP64.

Bug: 13935372
Change-Id: Id592f67e9b7051517a05f536e1373b30162e669c
2014-06-13 15:35:05 -07:00
Dan Albert
b84783ecaa Merge "Backing this one out since the counterpart needs to be sent upstream." 2014-06-12 05:34:11 +00:00
Elliott Hughes
ae3c6af3e5 Merge "[MIPS64] linker64 requires startup code" 2014-06-12 03:32:07 +00:00
Chris Dearman
9d98ee17fe [MIPS64] linker64 requires startup code
Change-Id: Iff2cd7d4dc40a67978bd9fc585b86e5a87afdbdd
2014-06-12 19:18:12 -07:00
Dan Albert
65b1c90a32 Merge "Hides valloc(3)/pvalloc(3) on LP64." 2014-06-12 03:32:07 +00:00
Elliott Hughes
1aaed87f7f Merge "Somewhere, the declaration of _resolv_delete_cache_for_net went missing." 2014-06-12 03:32:07 +00:00
Elliott Hughes
7f2d4c21cc Somewhere, the declaration of _resolv_delete_cache_for_net went missing.
I couldn't work out where this went missing from "git log", but it became
important with the switch to hidden visibility.

Change-Id: I921f81e36642a2c65c3ec85dc9b5b87c5d977a5b
2014-06-12 18:40:06 -07:00
Christopher Ferris
2ba734d8cd Merge "Fix %u format that should have been %zu." 2014-06-12 21:07:49 +00:00
Christopher Ferris
580b6e09fe Fix %u format that should have been %zu.
Change-Id: Icedacf6783d6b0cf4783c838b3c4622d2e67f073
2014-06-12 18:20:44 -07:00
Christopher Ferris
a403780538 Put all allocation functions into dispatch table.
Implement these new functions for all of the debug malloc types.

Fix a number of bugs in the debug malloc functions related to overflow
conditions.
Fix a bug in dlpvalloc due to an overflow condition.

Fix various other bugs in the debug malloc functions.

Add new tests for malloc functions.

Bug: 11225066

Change-Id: Idf50f389603e2157645565bc15cd9365eec2e9dd
2014-06-12 15:08:18 -07:00
Dan Albert
b725e7627f Merge "Removes wait3(2) from LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
8229ae46f4 Removes wait3(2) from LP64.
wait3(2) was removed from POSIX 2004. Keep the symbol around in LP32 for binary
compatibility, but remove the declaration in sys/wait.h.

Bug: 13935372
Change-Id: Ic715fce6781aae43b4ac6d745dc6d1e6b9914e71
2014-06-13 16:04:41 -07:00
Elliott Hughes
ff17671bc6 Merge "Add a hack to <stdlib.h> until we can fix libvpx." 2014-06-12 03:32:07 +00:00
Elliott Hughes
3fb5097a7e Add a hack to <stdlib.h> until we can fix libvpx.
libvpx should probably change its assembler to refer to lrand48 directly,
because that will work on old and new versions of Android. This keeps things
building until that happens.

Bug: 15598056
Change-Id: I4a1f59e710a083b9f9a707ceeb9ca0a28141a954
2014-06-12 17:50:52 -07:00
Elliott Hughes
5d25d5480a Merge "Remove __memcmp16 from bionic." 2014-06-12 05:34:11 +00:00
Elliott Hughes
24614b4729 Remove __memcmp16 from bionic.
Change-Id: I2486d667d96c8900dd368d855f37c1327161efb7
2014-06-12 15:35:22 -07:00
Elliott Hughes
564222e338 Merge "Use default hidden visibility to build libc_dns." 2014-06-12 05:34:11 +00:00
Christopher Ferris
29ddd78c21 Merge "Put all allocation functions into dispatch table." 2014-06-12 21:07:49 +00:00
Elliott Hughes
8563802b04 Use default hidden visibility to build libc_dns.
Bug: 11156955
Change-Id: Ia443705f5fbee0681039d4480abc89850968f475
2014-06-12 13:35:41 -07:00
Elliott Hughes
b67a3c2716 Merge "Fix GCC 4.9 complaint about int/size_t mismatch." 2014-06-12 05:34:11 +00:00
Elliott Hughes
5ab51d0d1a Fix GCC 4.9 complaint about int/size_t mismatch.
Change-Id: Ib13857f98658dc8760cff15adb5829e8e140008a
2014-06-12 12:52:58 -07:00
Dan Albert
f87ac523a1 Merge "Remove ioprio_get(2) and ioprio_set(2) from LP64." 2014-06-12 03:32:07 +00:00
Dan Albert
607341e226 Remove ioprio_get(2) and ioprio_set(2) from LP64.
Bug: 11156955
Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
2014-06-12 18:10:13 -07:00
Elliott Hughes
346fa721ca Merge "Get the full set of PRNG functions in <stdlib.h>" 2014-06-12 03:32:07 +00:00
Elliott Hughes
a0beeeabbc Get the full set of PRNG functions in <stdlib.h>
Bug: https://code.google.com/p/android/issues/detail?id=58888
Change-Id: I435250bdae302e8bd7e29977d0fde7b9afbfca5e
2014-06-12 14:37:31 -07:00
Elliott Hughes
1e7ae47d40 Merge "Bring our "libresolv" stuff in line with glibc." 2014-06-12 03:32:07 +00:00
Elliott Hughes
e8e453439f Bring our "libresolv" stuff in line with glibc.
Despite the name, most of resolv_private.h is actually in glibc; it's just
that there it's tucked away in libresolv whereas we have it in libc.

Change-Id: Ibcf6603f1141ffd2661cee0bffa83052d4f9e549
2014-06-13 11:50:07 -07:00
Elliott Hughes
15330331b6 Merge "Upgrade to tzdata2014e." 2014-06-12 21:07:49 +00:00
Elliott Hughes
addd6a2f1d Upgrade to tzdata2014e.
From the release notes:

  Changes affecting near-future time stamps

    Egypt's 2014 Ramadan-based transitions are June 26 and July 31 at 24:00.
    (Thanks to Imed Chihi.)  Guess that from 2015 on Egypt will temporarily
    switch to standard time at 24:00 the last Thursday before Ramadan, and
    back to DST at 00:00 the first Friday after Ramadan.

    Similarly, Morocco's are June 28 at 03:00 and August 2 at 02:00. (Thanks
    to Milamber Space Network.)  Guess that from 2015 on Morocco will
    temporarily switch to standard time at 03:00 the last Saturday before
    Ramadan, and back to DST at 02:00 the first Saturday after Ramadan.

  Changes affecting past time stamps

    The abbreviation "MSM" (Moscow Midsummer Time) is now used instead of
    "MSD" for Moscow's double daylight time in summer 1921.  Also, a typo
    "VLASST" has been repaired to be "VLAST" for Vladivostok summer time
    in 1991.  (Thanks to Hank W. for reporting the problems.)

Change-Id: Iaca5e8c2d572559b464b10d24f4315405e413ada
2014-06-13 10:55:19 -07:00
Christopher Ferris
3d5e0b2045 Merge "Add/Remove mmap tests." 2014-06-12 03:32:07 +00:00
Christopher Ferris
eda26bc1ff Add/Remove mmap tests.
Remove the incorrect tests that use a negative offset for mmap without
a fd.

Add a small set of tests for mmap.

Bug: 15436969

Change-Id: Id537d33cd4cdc26dee6cdfa9bf9cf35754bce335
2014-06-12 13:16:36 -07:00
Dan Albert
37b845f9e4 Merge "Remove declaration for putw(3)/getw(3)." 2014-06-12 05:34:11 +00:00
Dan Albert
8e613cf342 Remove declaration for putw(3)/getw(3).
These were both removed from POSIX 2004, and we don't define an
implementation for getw(3). Keep the definition of put(3) on LP32 for
binary compatibility.

Bug: 13935372
Change-Id: Iba384b45093ac6d2d7c2d81f7980cd7701dd6f56
2014-06-11 14:41:45 -07:00
Elliott Hughes
d242aff47d Merge "Fix most of the tzcode warnings." 2014-06-11 21:23:58 +00:00