Commit graph

8664 commits

Author SHA1 Message Date
Dmitriy Ivanov
f33a7d7f1c Merge "Fix mips build" 2014-10-23 22:53:24 +00:00
Dmitriy Ivanov
398eb5a7ee Merge "Remove unnecessary lookups during relocations" 2014-10-23 22:53:13 +00:00
Dmitriy Ivanov
90b74fb867 Fix mips build
Change-Id: Ia2dc2e07740bdbb91ee92bfea459230015fcc99b
2014-10-23 14:34:12 -07:00
Dmitriy Ivanov
e47b3f8456 Remove unnecessary lookups during relocations
local_group includes this library and its dependencies.

Change-Id: Ib02474b2355bb147de3889f60092cb2f312997ef
2014-10-23 14:19:07 -07:00
Dmitriy Ivanov
566f2bc623 Merge "Fix relocation to look for symbols in local group" 2014-10-23 20:49:00 +00:00
Dmitriy Ivanov
cfa97f172d Fix relocation to look for symbols in local group
The local group is a sequence of libraries in default (breadth-first)
  order. It allows RTLD_LOCALLY loaded library to correctly relocate
  symbols within its group (see test-cases).

  Local group lookup is performed after main executable and ld_preloads.

Bug: 2643900
Bug: 15432753
Change-Id: I9bb013b46d17dbb5cbdfb8fef26f552748385541
2014-10-23 12:13:54 -07:00
Elliott Hughes
6c5694b6c8 Merge "Migrate system/extra getaddrinfo test, and fix a bug in getservbyname(3)." 2014-10-23 17:57:06 +00:00
Derek Xue
ba811120ae Migrate system/extra getaddrinfo test, and fix a bug in getservbyname(3).
This change is to migrate the getaddrinfo tests defined in the old file
system/extras/tests/bionic/libc/common/test_getaddrinfo.c
to the new place bionic/tests/netdb_test.cpp.

The test here is more thorough, and catches a bug in getservbyname(3)
that was breaking getaddrinfo(3)'s ability to look up services by name
without a hint that would cause it to ask for a specific protocol.

Change-Id: Ief5ebd0869496d1bc6a97861dfefa04bdf24bab1
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2014-10-22 22:23:10 -07:00
Elliott Hughes
cf8ea37fc9 Merge "bionic/tests: migrate gethostbyname bionic test from system/extra to bionic/tests" 2014-10-22 21:30:40 +00:00
Derek Xue
4912fc7d15 bionic/tests: migrate gethostbyname bionic test from system/extra to bionic/tests
this change migrate the gethostbyname test defined in the old file
system/extras/tests/bionic/libc/common/test_gethostbyname.c
to the new place bionic/tests/netdb_test.cpp

Change-Id: I342171090f681581fb54d68ea4a09adf61f52081
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
2014-10-22 14:30:01 -07:00
Elliott Hughes
e516321d78 Merge "Update bionic to tzdata2014i." 2014-10-22 20:41:44 +00:00
Christopher Ferris
efd2ec8fbd Merge "Fix race condition in timer disarm/delete." 2014-10-22 20:33:06 +00:00
Christopher Ferris
62d84b1935 Fix race condition in timer disarm/delete.
When setting a repeat timer using the SIGEV_THREAD mechanism, it's possible
that the callback can be called after the timer is disarmed or deleted.
This happens because the kernel can generate signals that the timer thread
will continue to handle even after the timer is supposed to be off.

Add two new tests to verify that disarming/deleting doesn't continue to
call the callback.

Modify the repeat test to finish more quickly than before.

Refactor the Counter implementation a bit.

Bug: 18039727

(cherry pick from commit 0724132c32)

Change-Id: I135726ea4038a47920a6c511708813b1a9996c42
2014-10-22 13:20:39 -07:00
Elliott Hughes
a05c2a2a70 Update bionic to tzdata2014i.
From the release notes:

   Changes affecting future time stamps

     Pacific/Fiji will observe DST from 2014-11-02 02:00 to
     2015-01-18 03:00.  (Thanks to Ken Rylander for the heads-up.)
     Guess that future years will use a similar pattern.

     A new Zone Pacific/Bougainville, for the part of Papua New
     Guinea that plans to switch from UTC+10 to UTC+11 on
     2014-12-28 at 02:00.  (Thanks to Kiley Walbom for the
     heads-up.)

   Changes affecting time zone abbreviations

     Since Belarus is not changing its clocks even though Moscow
     is, the time zone abbreviation in Europe/Minsk is changing
     from FET to its more-traditional value MSK on 2014-10-26 at
     01:00.  (Thanks to Alexander Bokovoy for the heads-up about
     Belarus.)

     The new abbreviation IDT stands for the pre-1976 use of UT+8
     in Indochina, to distinguish it better from ICT (UT+7).

   Changes affecting past time stamps

     Many time stamps have been corrected for Asia/Ho_Chi_Minh
     before 1976 (thanks to Trần Ngọc Quân for an indirect pointer
     to Trần Tiến Bình's authoritative book).  Asia/Ho_Chi_Minh has
     been added to zone1970.tab, to give tzselect users in Vietnam
     two choices, since north and south Vietnam disagreed after our
     1970 cutoff.

     Asia/Phnom_Penh and Asia/Vientiane have been turned into
     links, as they differed from existing zones only for older
     time stamps.  As usual, these changes affect pre-1970 time
     stamps only.  Their old contents have been moved to the
     'backzone' file.

Bug: 18085936
Change-Id: I89c065b4788b10ed7530cc4e8cfbc1b65c05c1b7
2014-10-22 12:31:02 -07:00
Chih-Hung Hsieh
098cf45f4e Merge "Replace ambiguous cmp operator with cmpl." 2014-10-22 00:55:14 +00:00
Chih-Hung Hsieh
c89ee272fb Replace ambiguous cmp operator with cmpl.
Clang assembler rejects ambiguous cmp instruction.

BUG: 17302482
Change-Id: Ie8dca7e4f46e0906c47076bba21c1941482ba6b3
2014-10-21 16:25:35 -07:00
Dmitriy Ivanov
54d76360eb Merge "Rename library_offset to library_fd_offset" 2014-10-21 21:06:18 +00:00
Dmitriy Ivanov
a6c1279098 Rename library_offset to library_fd_offset
replace lseek() and use pread() instead
 add test for library_fd_offset > file_size case

Bug: 17762003
Change-Id: I4555f0be635124efe849c1f226985bcba72ffcbd
2014-10-21 13:51:08 -07:00
Dan Albert
ad136624b2 Merge "Never use ASAN." 2014-10-21 18:28:19 +00:00
Dan Albert
5ba672ebcb Never use ASAN.
Unless we completely redo how we build bionic (so that the object
files for libc.so get built separately from libc.a), we can't enable
ASAN here, as libc.a gets linked into static executables.

Change-Id: I2ce4f51248bd51c4213a555ff481b6faabbf53f8
2014-10-21 11:22:26 -07:00
Christopher Ferris
8f41d3d3bc Merge "Fix generic __memcpy_chk implementation." 2014-10-20 18:21:22 +00:00
Chih-Hung Hsieh
9a7404824b Merge "Add -no-integrated-as at local level." 2014-10-20 16:51:06 +00:00
Chih-Hung Hsieh
a371750681 Add -no-integrated-as at local level.
Later we will enable integrated-as as default at the global level.

BUG: 17820427
BUG: 17302991
Change-Id: I233204ca04d7222b2cb1fbd0fa48a482f8b63f6f
2014-10-20 09:09:25 -07:00
Christopher Ferris
7123d4371a Fix generic __memcpy_chk implementation.
- Clean up the labels (add .L to make them local).
- Change to using cfi directives.
- Fix unwinding of the __memcpy_chk fail path.

Bug: 18033671
Change-Id: I12845f10c7ce5e6699c15c558bda64c83f6a392a
2014-10-17 14:44:36 -07:00
Dmitriy Ivanov
dec4de456c Merge "Correct way to specify additional dependencies" 2014-10-17 20:19:18 +00:00
Dmitriy Ivanov
4a9e1937c5 Correct way to specify additional dependencies
Previous one was not covering all the targets

Bug: 17548097
Change-Id: I425e0f8d6e5a43feabd29dcb327049b82754d249
2014-10-17 11:47:18 -07:00
Dmitriy Ivanov
5281e1fb15 Merge "Fix misleading comment." 2014-10-16 17:54:02 +00:00
Dan Albert
90aa7e374f Merge "Only use <atomic> for C++11 and newer." 2014-10-16 16:19:44 +00:00
Dan Albert
8bb12127e6 Merge "Don't use an STL for libm." 2014-10-16 15:56:32 +00:00
Dan Albert
3ce0769aa5 Only use <atomic> for C++11 and newer.
Any pre-C++11 clients of stdatomic.h that use libc++ are being forced
over to <atomic>, which they don't have the language support to use.

Change-Id: I62445c1f2541410a1569498c09433c7196635537
2014-10-16 07:52:51 -07:00
Dan Albert
e91d9cd4ad Don't use an STL for libm.
The default is none right now, but this will be needed when the
default becomes libc++.

Change-Id: Ib022adac2b9dc08fbfae830908128043cfffb91e
2014-10-16 07:44:47 -07:00
Dmitriy Ivanov
f5e0258268 Merge "Ignore DT_BIND_NOW (0x18)" 2014-10-15 23:46:26 +00:00
Dmitriy Ivanov
ea6eae182a Ignore DT_BIND_NOW (0x18)
Bug: 17552334
Change-Id: Ibe93fd3d6580f369f9a6ef8d235bf0df00fe7607
2014-10-15 22:57:14 +00:00
Robert Grosse
4544d9f9bf Fix misleading comment.
Change-Id: I9e2aa6c2ba938c8f8d7c74eba32d313c866c77b2
2014-10-15 14:32:19 -07:00
Dan Albert
71cbcdcf94 Merge "We don't actually need all of libc++ here." 2014-10-15 19:59:09 +00:00
Dan Albert
a7c2e0bad6 We don't actually need all of libc++ here.
All we're actually interested in is the unwinder. Since that's now a
separate library, just use that.

Change-Id: If86071a0d850da961336a58147b70369ace7bd12
2014-10-14 14:19:34 -07:00
Elliott Hughes
97df16ba5c Merge "Add clock_settime and clock_nanosleep." 2014-10-14 03:07:43 +00:00
Haruki Hasegawa
1816025684 Add clock_settime and clock_nanosleep.
Add the missing prototypes, fix the existing prototypes to use clockid_t
rather than int, fix clock_nanosleep's failure behavior, and add simple
tests.

Bug: 17644443
Bug: https://code.google.com/p/android/issues/detail?id=77372
Change-Id: I03fba369939403918abcabae9551a7123953d780
Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
2014-10-13 17:04:10 -07:00
Dmitriy Ivanov
c229705051 Merge "Add glibc alias for NT_PRFPREG" 2014-10-13 22:08:52 +00:00
Dmitriy Ivanov
a6bee4df4c Add glibc alias for NT_PRFPREG
Also fix comment style for DF_1_ constants

Change-Id: I7c3ed1d834f0a2b85ee8cc8016c79020955084f8
2014-10-13 15:03:27 -07:00
Christopher Ferris
083769a3df Merge "Return total footprint, not high water mark." 2014-10-13 19:48:35 +00:00
Christopher Ferris
fee09e556f Return total footprint, not high water mark.
The mallinfo usmblks value returned by dlmalloc is a little misleading.
It's not the current max, it's the historical high water mark. This
leads to dumpsys meminfo producing native memory numbers that don't add up.
Change this to the real total footprint, not this high water mark.

Bug: 17265653

(cherry pick from commit f4ada9c9ce)

Change-Id: I2fba10285859dccfe8331063c9be14cc169f2d91
2014-10-13 12:45:35 -07:00
Dan Albert
94571f9ade Merge "Use LOCAL_CXX_STL to select libc++_static." 2014-10-13 19:09:00 +00:00
Dan Albert
90a29db0f4 Use LOCAL_CXX_STL to select libc++_static.
Directly adding the library to LOCAL_STATIC_LIBRARIES thwarts a few
build system checks.

Change-Id: Ib23c43badfa85de21c691f79ccdcc2cbe2a89b33
2014-10-13 11:20:29 -07:00
Dan Albert
4c0862474e Merge "Fix some formatting so GitHub displays it nicely." 2014-10-11 00:48:33 +00:00
Dan Albert
472cce5c98 Fix some formatting so GitHub displays it nicely.
Change-Id: Id6ce9a61bebd98544c85e5780147715c73d0e78b
2014-10-10 17:14:37 -07:00
Dan Albert
8c3901b299 Merge "Improve documentation for testing and coverage." 2014-10-10 18:59:03 +00:00
Dan Albert
efee1ce46a Improve documentation for testing and coverage.
Also rename HACKING.txt to README.md so it will display on the GitHub
mirror.

Change-Id: I70157a4ad262700212bf9afd87253d195c7013a9
2014-10-10 11:45:19 -07:00
Elliott Hughes
2698f9ef84 Merge "Catch up on upstream's round/roundf/roundl." 2014-10-10 17:29:52 +00:00
Elliott Hughes
14538ca75e Catch up on upstream's round/roundf/roundl.
Not sure how we missed these, but better late than never...

Change-Id: Ib08d1bb6e340a1907cbeb1cbe220e33f70642bdc
2014-10-10 10:21:43 -07:00