Commit graph

44 commits

Author SHA1 Message Date
Colin Cross
2d4721c0c5 Export malloc_backtrace
Change-Id: Ic1adb4dfd86b9ca698443a36263a3df2c91edda3
2016-02-18 16:09:16 -08:00
Colin Cross
869691c6f7 Export malloc_iterate and friends
Export malloc_iterate, malloc_enable, and malloc_disable to be used by
libmemunreachable.

Change-Id: I08a50349af82a95d096b6b4cbac37ababe4b9b06
2016-02-18 15:05:38 -08:00
Elliott Hughes
0c485dae70 Add in6addr_any and in6addr_loopback symbols.
Change-Id: I3a90fa448b6bd43321672ba74b84a4e9e8a67738
2016-02-03 14:13:52 -08:00
Elliott Hughes
5f26c6bc91 Really add adjtimex(2), and add clock_adjtime(2) too.
Change-Id: I81fde2ec9fdf787bb19a784ad13df92d33a4f852
2016-02-03 13:19:10 -08:00
Elliott Hughes
f226ee59e0 Add fopen64/freopen64/tmpfile64 aliases.
Our fopen/freopen/tmpfile are already always O_LARGEFILE, but let's add
the aliases for _LARGEFILE_SOURCE compatibility.

Bug: http://b/24807045
Change-Id: I5d99b3ef3c9f27ce70f13313f6a92e96c7f21f80
2016-02-03 11:24:28 -08:00
Elliott Hughes
e4fa6e9cc7 Expose ftello64.
Also add the missing test that would have caught this.

Bug: http://b/24807045
Change-Id: I756a4d825595b52396b15898e3f717156fd1ba2f
2016-02-02 22:39:15 -08:00
Dimitry Ivanov
ffaa2169d7 Hide '__moddi3' symbol for x86 and mips
Bug: http://b/26805673
Change-Id: I7dc213e9f25510a2a74a30e8c43fd7a64cb3dbdb
2016-01-27 15:12:19 -08:00
Dimitry Ivanov
aa2fd0fece Hide '__isthreaded' for lp64 libc.so
Bug: http://b/26805673
Change-Id: I2928d68287894be9f9ae7ed1858af512d8c80a3b
2016-01-27 14:54:36 -08:00
Elliott Hughes
896224aa7f Merge "Implement funopen64." 2016-01-26 23:26:43 +00:00
Dimitry Ivanov
3a33b52981 Merge "Move android_ network functions to LIBC_PRIVATE" 2016-01-26 22:47:56 +00:00
Elliott Hughes
03e65eb03b Implement funopen64.
Bug: http://b/24807045
Change-Id: I161920978161389be34b707cc6ce8e05f760d552
2016-01-26 14:45:13 -08:00
Dimitry Ivanov
97cb4fbed2 Move android_ network functions to LIBC_PRIVATE
Make following functions platform-private:
 android_getaddrinfofornet
 android_getaddrinfofornetcontext
 android_gethostbyaddrfornet
 android_gethostbynamefornet

Bug: http://b/26794226
Change-Id: I0855b0b82721e4d24e918508931b4d5587fcae7d
2016-01-26 14:44:00 -08:00
Elliott Hughes
94bb0fab93 Merge "Support _FILE_OFFSET_BITS=64 for most of <stdio.h>." 2016-01-26 20:51:59 +00:00
Elliott Hughes
5704c423c8 Implement POSIX lockf.
This has been requested a few times over the years. This is basically
a very late rebase of https://android-review.googlesource.com/45470
which was abandoned years ago. One addition is that this version has
_FILE_OFFSET_BITS=64 support.

POSIX puts this in <unistd.h>. glibc also has it in <fcntl.h>.

Bug: http://b/13077650
Change-Id: I5862b1dc326e326c01ad92438ecc1578d19ba739
2016-01-26 11:09:44 -08:00
Elliott Hughes
9677fab88c Support _FILE_OFFSET_BITS=64 for most of <stdio.h>.
This doesn't address funopen, but does add fgetpos/fsetpos/fseeko/ftello.

Bug: http://b/24807045
Change-Id: Ibff6f00df5fb699c8e8f13b91a75caf024540b73
2016-01-26 09:14:41 -08:00
Dimitry Ivanov
bba395492a Revert "Temporary apply LIBC version to __pthread_gettid"
This reverts commit 0ef1d121b5.

Bug: http://b/26392296
Bug: http://b/26391427
Change-Id: I7bbb555de3a43813e7623ff6ad4e17874d283eca
2016-01-22 01:43:04 +00:00
Dimitry Ivanov
05c2f6b3d3 Merge "libc: hide __signalfd4 symbol" 2016-01-22 01:41:27 +00:00
Dimitry Ivanov
90d2daec51 libc: hide fake_gmtime_r and fake_localtime_r
Bug: http://b/26274444
Change-Id: Icf96a00142a287d8d3466d2545e213e605601b42
2016-01-21 16:05:23 -08:00
Dimitry Ivanov
1a8732c232 libc: hide __signalfd4 symbol
Bug: http://b/26274444
Change-Id: Iaa2df640cac07e2e407ca11b9701ee9e11729146
2016-01-21 15:19:52 -08:00
Elliott Hughes
ed57b98758 Implement if_nameindex(3)/if_freenameindex(3).
This is just a subset of the recently-implemented getifaddrs(3), though if
we want to handle interfaces (such as "rmnet_*") that don't have an address,
we need to either expose ifaddrs_storage and keep track of which interfaces
we've already seen (which is pretty messy), or refactor the netlink code so
we can reuse it and just extract the information we need for if_nameindex(3).
This patch goes the latter route.

Also clean up if_nametoindex(3) and if_indextoname(3).

Change-Id: I5ffc5df0bab62286cdda2e7af06f032c767119a8
2016-01-18 12:07:38 -08:00
Dimitry Ivanov
126d5ab779 Merge "Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"" 2016-01-13 20:35:25 +00:00
Dimitry Ivanov
e1078a939a Revert "Move __system_property* to LIBC_PRIVATE for lp64 libc"
This reverts commit ff14fb5a1f.

Bug: http://b/26497521
Change-Id: Id7131b37a31e936db0e72ef9969e1f13d2dd578f
2016-01-13 20:32:12 +00:00
Elliott Hughes
1464f6d8d9 Merge "Remove mktime_tz." 2016-01-06 19:02:19 +00:00
Dimitry Ivanov
bc02fb964a Temporary move __udivdi3 back to LIBC for x86
Bug: http://b/26289334
Bug: http://b/26413821
Change-Id: Ifb0eb6f16aca54cb4a9184a6394992ee57dd3408
2016-01-06 18:36:40 +00:00
Elliott Hughes
76dfa6e351 Remove mktime_tz.
Bug: http://b/15765976
Change-Id: Ifc8cd19ae621e611d66173ae927ef9a0445965c1
2016-01-06 09:15:02 -08:00
Dimitry Ivanov
6134ed8b8f Deprecate bzero
bzero is hashdefined to memset in strings.h and it
was removed from POSIX 2008.

Bug: http://b/26407170
Change-Id: Ia6d54f0e314dc7f5f3fbad0e9b00344f49f77d43
2016-01-05 17:06:45 -08:00
Dimitry Ivanov
0ef1d121b5 Temporary apply LIBC version to __pthread_gettid
This is workaround for http://b/26391427

Bug: http://b/26391427
Change-Id: Ibf5c611cf4c04dfa595644225e6d9503089a18da
2016-01-05 00:19:13 -08:00
Dimitry Ivanov
04673ee997 Merge changes I4fc241e6,Idca71396
* changes:
  Move __system_property* to LIBC_PRIVATE for lp64 libc
  Move ndk-cruft symbols to LIBC_PRIVATE
2016-01-04 22:52:21 +00:00
Dimitry Ivanov
ff14fb5a1f Move __system_property* to LIBC_PRIVATE for lp64 libc
Bug: http://b/26367254
Change-Id: I4fc241e69444a4b5641dfdf09576fe3ce5c1169e
2016-01-04 14:39:42 -08:00
Dimitry Ivanov
eac1d371f6 Move ndk-cruft symbols to LIBC_PRIVATE
Bug: http://b/26385283
Change-Id: Idca71396f9de4141eefc4e1851ba92ebff1ac792
2016-01-04 13:48:47 -08:00
Elliott Hughes
9cddb482b4 Revert "Revert "Implement getifaddrs(3)/freeifaddrs(3).""
This reverts commit 76814a8250.

This differs from the original in fixing the GCC -Werror build:

  bionic/libc/bionic/ifaddrs.cpp: In function 'void __handle_netlink_response(ifaddrs**, nlmsghdr*)':
  bionic/libc/bionic/ifaddrs.cpp:113:62: error: use of old-style cast [-Werror=old-style-cast]
       ifinfomsg* ifi = reinterpret_cast<ifinfomsg*>(NLMSG_DATA(hdr));

This appears to be a GCC bug; the GCC command-line correctly uses -isystem,
and manually adding #pragma GCC system_header doesn't help. So just turn the
warning off for GCC for now. We won't need to worry about building with GCC
soon anyway.

Bug: http://b/26238832
Change-Id: I01615bd335edf11baf487b1c83a9157cd780f4a1
2016-01-04 13:00:39 -08:00
Dimitry Ivanov
788a2bc756 Make some of unwanted symbols LIBC_PRIVATE
Bug: http://b/26274444
Change-Id: Ic66f6519a974b72779071235c1d0dd36655fd1b9
2015-12-21 23:26:53 -08:00
Dimitry Ivanov
5ce79b0af3 Make symbols exported via libgcc.a LIBC_PRIVATE
Bug: http://b/26298172
Change-Id: Ic16acea56624680d48c0b190fbe5a6142a3fca2b
2015-12-21 22:54:35 -08:00
Dimitry Ivanov
bc2e88a85d Revert "Revert "Remove remaining ndk_cruft from LP64 platforms""
This reverts commit 23af25b747.

Bug: http://b/26164862
Change-Id: I201bf49530f33f8ba6a1a35b79723afb9e84c7a5
2015-12-16 19:02:04 +00:00
Dimitry Ivanov
23af25b747 Revert "Remove remaining ndk_cruft from LP64 platforms"
This reverts commit b1d0a2ae77.

Change-Id: I1da06be0b78a4f2a4cad7e4a19a3ee755f55a813
2015-12-15 01:34:14 +00:00
Dimitry Ivanov
b1d0a2ae77 Remove remaining ndk_cruft from LP64 platforms
This change removes endpwent, dlmalloc_inspect_all, dlmalloc_trim
from lp64 libc.so. It also removed necessety of having brillo
version scripts for lp64 platforms.

Bug: http://b/26164862
Change-Id: I4e9b38907bb1dc410f0eb6d2f5d5944fe713da51
2015-12-14 15:49:28 -08:00
Dimitry Ivanov
585e959849 Generate libc version-script for brillo
Brillo doesn't use the ndk cruft, so we need
separate set of version scripts. Added new "nobrillo"
tag to mark such symbols in *.map.txt files.

Bug: http://b/26164862
Change-Id: Iaee1b7119f75b68c2971679fc32817e6df29fd94
2015-12-14 14:23:06 -08:00
Yabin Cui
fe3a83a934 Implement pthread spin.
In order to run tsan unit tests, we need to support pthread spin APIs.

Bug: 18623621
Bug: 25392375
Change-Id: Icbb4a74e72e467824b3715982a01600031868e29
2015-11-18 17:51:21 -08:00
Yabin Cui
b804b9d67b Merge "Implement pthread barrier." 2015-11-17 00:22:54 +00:00
Yabin Cui
e7c2fffa16 Implement pthread barrier.
Bug: 24341262
Change-Id: I5472549e5d7545c1c3f0bef78235f545557b9630
2015-11-16 14:02:26 -08:00
Yabin Cui
fb994f4c04 Add fileno_unlocked to support thread sanitizer.
Bug: 25392375
Change-Id: If3f92a0e08a53f4b59e01397e8efa307d8572349
2015-11-06 16:13:47 -08:00
Elliott Hughes
4151db5f99 Add prlimit to LP32.
Bug: http://b/24918750
Change-Id: I0151cd66ccf79a6169610de35bb9c288c0fa4917
2015-10-28 20:04:59 -07:00
Dmitriy Ivanov
e85fb580c8 Fix LDFLAGS for arm and x86
Change-Id: I5366f4499cb4da3a51b8484ab3e4ff785f0888ab
2015-10-28 17:25:34 -07:00
Dmitriy Ivanov
284b468524 Generate per-architecture version scripts.
Bug: http://b/24767418
Change-Id: I23e49d8d30c0def3215ffbd99d09f207d9483624
2015-10-28 16:40:53 -07:00