OSDN Git Service
Dmitriy Ivanov [Fri, 17 Oct 2014 18:47:18 +0000 (11:47 -0700)]
Correct way to specify additional dependencies
Previous one was not covering all the targets
Bug:
17548097
Bug:
18186310
(cherry picked from commit
4a9e1937c56511aef579312bf39ab345f9179230)
Change-Id: I2cd9e58893555d16cbfe291b2d1279621489d5ad
Dmitriy Ivanov [Fri, 31 Oct 2014 06:42:45 +0000 (23:42 -0700)]
Add dlfcn_test to glibc test suite.
Bug:
18186310
(cherry picked from commit
eb27bbae8f0edc6b62ca2db73256c7fb53b9e9bf)
Change-Id: I1d608dfa12dbafbdcdb8bc6d818c5872404c19e0
Dmitriy Ivanov [Wed, 15 Oct 2014 21:59:01 +0000 (14:59 -0700)]
Ignore DT_BIND_NOW (0x18)
Bug:
18186310
Bug:
17552334
(cherry picked from commit
ea6eae182ad64312f80b9adddac511d8938e23e7)
Change-Id: I07d6f6fbb462fea329581d0da02f6d88be1c262f
Dmitriy Ivanov [Mon, 6 Oct 2014 18:30:43 +0000 (11:30 -0700)]
Resolve "unused DT entry" warnings for x86_64
Bug:
18186310
(cherry picked from commit
513e29e16f16a6ffa1636ba282d599fd6b437aeb)
Change-Id: I1e4c5af2cdc09dc978c7a78fcdcf8796c919751e
Dmitriy Ivanov [Mon, 19 May 2014 22:06:58 +0000 (15:06 -0700)]
Add RTLD_NODELETE flag support
Bug:
18186310
Bug: https://code.google.com/p/android/issues/detail?id=64069
(cherry picked from commit
1b20dafdbe65e43b9f4c95057e8482380833ea91)
Change-Id: Ic02eec22a7c322ece65eb40730a3404f611526b1
Dmitriy Ivanov [Tue, 30 Sep 2014 23:30:22 +0000 (16:30 -0700)]
Fix mips build
Bug:
18186310
(cherry picked from commit
ecf532fa1cfe91ca946243c11ef154c602870ba6)
Change-Id: Ia12f2fa28c8cd3204eb7d6b4c7d872f4e81fb8ef
Dmitriy Ivanov [Tue, 30 Sep 2014 02:14:45 +0000 (19:14 -0700)]
Fix unused DT entry warnings.
DT_STRSZ Implement strtab boundary checks
DT_FLAGS_1 Warn if flags other than DF_1_NOW|DF_1_GLOBAL are set
Bug:
17552334
Bug:
18186310
(cherry picked from commit
6cdeb5234d7f4523fe9d83974f265d80f10512a6)
Change-Id: I7ffc7bc600798308a77ad949a644949b64250ae2
Dmitriy Ivanov [Mon, 29 Sep 2014 19:10:36 +0000 (12:10 -0700)]
Return has_DT_SYMBOLIC flag.
This reverts commit
8f61d991831f0ea515fa50a5c38dbbcfbab0dd28
Despite the fact that static linker does all the work while linking
-Bsymbolic executables, according to the SCO doc following DT_SYMBOLIC
and DF_SYMBOLIC flags is still a requirement for the dynamic linker
as well.
(see http://www.sco.com/developers/gabi/2012-12-31/ch5.dynamic.html)
Bug:
18186310
(cherry picked from commit
96bc37f2e1093416a432135265fd7a4db6c3df17)
Change-Id: Ie217be4f3305d877066e4cfe91975ae1c7768330
Elliott Hughes [Tue, 23 Sep 2014 00:43:09 +0000 (17:43 -0700)]
Fix a couple more cases of missing CLOEXEC.
The debuggerd case can probably never happen, because you're crashing at this
point anyway. The system property one seems possible though.
Bug:
18186310
(cherry picked from commit
0dc39f9952c5e3a3121ea77357bb264ef0f8ded7)
Change-Id: I3e84488fc246f6c28cbd82e96d0cd4343a12c28a
Dmitriy Ivanov [Wed, 17 Sep 2014 23:46:40 +0000 (16:46 -0700)]
Temporary disable DL_WARNs for unused DT_*
Bug:
17552334
Bug:
18186310
(cherry picked from commit
1b77423eff21e916186fcb208f138e436e9f3052)
Change-Id: I8a9d05195a862bc287fff7156913606f0311b8bb
Dmitriy Ivanov [Wed, 17 Sep 2014 06:34:20 +0000 (23:34 -0700)]
Fix 64bit build
Bug:
18186310
(cherry picked from commit
f240aa8089ea1574a7d799720efb66528f6ceb99)
Change-Id: Id46f1f9be90a17a58fb44d3540095c8c685c9726
Dmitriy Ivanov [Tue, 16 Sep 2014 22:51:25 +0000 (15:51 -0700)]
Fix some unused DT_ warnings
* DT_PLTGOT - ignored for non-mips
* DT_RELCOUNT/RELACOUNT - ignored
* DT_RELENT/RELAENT - sanity checks
* DT_SYMENT - sanity check
* DT_SONAME - ignore for now.
Bug:
18186310
(cherry picked from commit
4a6e9a835a84aca965f0170f604381dae7f130be)
Change-Id: Ib40095f0770d65628fc7abac5a471378de35ebe7
Dmitriy Ivanov [Tue, 16 Sep 2014 21:31:06 +0000 (14:31 -0700)]
Remove has_DT_SYMBOLIC flag
From the elf-spec: "Symbolically bound shared objects are
identified by the .dynamic entry DT_SYMBOLIC. This tag is
informational only; the runtime linker processes symbol
lookups from these objects in the same manner as any
other object."
Bug:
18186310
(cherry picked from commit
8f61d991831f0ea515fa50a5c38dbbcfbab0dd28)
Change-Id: I37024799ac8d1837993c8ae78780a448bedd6539
Dmitriy Ivanov [Tue, 16 Sep 2014 00:00:10 +0000 (17:00 -0700)]
Fix dlsym() to take into account RTLD_GLOBAL/LOCAL
Symbols from libraries opened with RTLD_LOCAL (default)
should not be visible via dlsym(RLTD_DEFAULT/RTLD_NEXT, .)
Bug:
17512583
Bug:
18186310
(cherry picked from commit
e8ba50fe0d51fbefee1a8f5bb62bf51d841512c8)
Change-Id: Idf6bbe2233fb2bfc0c88677e7d1fc518fb3f7a8b
Dmitriy Ivanov [Fri, 12 Sep 2014 16:43:13 +0000 (09:43 -0700)]
Reformatting
No functional changes.
Bug:
18186310
(cherry picked from commit
6abf624d122bec8c80cc9fe1b692265bf1b28b1b)]
Change-Id: I0acf52d8ee7fe2d4f44bc832cbe9fabe1782f03f
Dan Albert [Thu, 16 Oct 2014 14:52:51 +0000 (07:52 -0700)]
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.
Bug:
17736764
Change-Id: I62445c1f2541410a1569498c09433c7196635537
(cherry picked from commit
3ce0769aa5f9a991af1d167f730d987dd002253c)
Elliott Hughes [Wed, 29 Oct 2014 23:22:30 +0000 (23:22 +0000)]
Merge changes I0feda6b2,I22d13fde,I49d7d09d,Ice490bfe into lmp-mr1-dev
* changes:
Fix the type of u_ar0 in <sys/user.h>.
Add greg_t for arm64.
POSIX says <signal.h> gets you ucontext_t.
Add in_port_t and move it and in_addr_t to the correct header file.
Elliott Hughes [Sat, 25 Oct 2014 03:57:09 +0000 (20:57 -0700)]
Fix the type of u_ar0 in <sys/user.h>.
(cherry picked from commit
e03950fa0c5567edf70d011b856a027e03b1c0f7)
Bug:
18172268
Change-Id: I0feda6b253882f68f47bcf30fad998286cc7f620
Elliott Hughes [Fri, 19 Sep 2014 17:31:49 +0000 (10:31 -0700)]
Add greg_t for arm64.
This was already present for the other architectures. I think we skipped
this because glibc seems to have an incorrect definition (int rather than
long), but the kernel has the sane definition (just not in a uapi header).
(cherry picked from commit
8e4d371091e5738346f5c6ad395b8487c2a5ec67)
Bug:
18172268
Change-Id: I22d13fdeb6431ea122dd028a229782dcaf2286b2
Elliott Hughes [Sat, 13 Sep 2014 03:04:40 +0000 (20:04 -0700)]
POSIX says <signal.h> gets you ucontext_t.
POSIX also says that ucontext_t's uc_sigmask has type sigset_t.
MIPS64 strace needs this.
The #define is to keep chromium off our lawn; otherwise it tries to redefine
all this stuff itself. We should probably clean that up and remove the #define.
(cherry picked from commit
26a8eb50a84e131d34d10d5d167d67e9995399bd)
Bug:
18172268
Change-Id: I49d7d09dabfc6c6926a8e1f4b235d041e2f2fc4d
Elliott Hughes [Tue, 19 Aug 2014 19:43:50 +0000 (12:43 -0700)]
Add in_port_t and move it and in_addr_t to the correct header file.
No one's reported this, but I saw it in an Android port of fuser(1).
We still have lots of problems in our network headers because we
get most of the structs direct from the kernel, and it doesn't use
types like this (which is why we've got away without this one for
so long). One day we should probably look at cleaning that up, but
doing so can wait.
(cherry picked from commit
35d226e05d92824c6eb992e7a64ea22efc8bae03)
Bug:
18172268
Change-Id: Ice490bfe84afb04722d738128053d4c533b8a664
Christopher Ferris [Tue, 30 Sep 2014 18:53:13 +0000 (11:53 -0700)]
Add stpcpy assembler version.
For generic, continue to use the C version of the code.
Bug:
13746695
(cherry picked from commit
7d849ac378515efa1522e538e6e1d3b546cae97d)
Change-Id: Iae44785f37f9bb59103ab78fb9f74c92f8a95c7f
Christopher Ferris [Mon, 29 Sep 2014 22:34:20 +0000 (15:34 -0700)]
Cleanup arm assembly.
Remove the old arm directives.
Change the non-local labels to .L labels.
Add cfi directives to strcpy.S.
Bug:
18157900
(cherry picked from commit
c8bd2abab24afe563240297018c4fa79944f193b)
Change-Id: Ifa1c3d16553d142eaa0d744af040f0352538106c
Christopher Ferris [Thu, 25 Sep 2014 00:05:20 +0000 (17:05 -0700)]
Add __memcpy_chk assembly for 64 bit.
Bug:
17623887
(cherry picked from commit
8cf61dab5f11ed5654a5760ab47cec0239caafe0)
Change-Id: I91e66ca0c26f04b50308059f9c89d388d55f6e3a
Elliott Hughes [Wed, 17 Sep 2014 02:06:31 +0000 (19:06 -0700)]
Clean up the architecture-specific makefiles.
Group things appropriately and name each group.
Bug:
18160821
(cherry picked from commit
7c02d9428ca18ac600f7ba7d51bb24ca71e733f6)
Change-Id: I863242515af44058154d03e2d8c34678e682d66a
Elliott Hughes [Tue, 16 Sep 2014 23:27:35 +0000 (16:27 -0700)]
No arm source refers to SOFTFLOAT.
So why bother #defining it?
Bug:
18160821
(cherry picked from commit
b1a6c319c40674d71e30313040d3b33b8bddf24b)
Change-Id: I9cd9c144ba7071fddda12fa16d1232ad861b66be
Elliott Hughes [Thu, 4 Sep 2014 22:43:10 +0000 (15:43 -0700)]
Fix mips signed/unsigned signal_test.cpp build breakage.
(cherry picked from commit
aa13e839f06231b9299bb683a71abd954294b49b)
Bug:
17436734
Change-Id: I167fc5d74c49cca7031c5739bc53fdf3bde71887
Christopher Ferris [Wed, 24 Sep 2014 01:31:45 +0000 (18:31 -0700)]
Remove the unnecessary generic-neon code.
Bug:
18156619
(cherry picked from commit
2169e17482da91865e412e55b52b88d7c8db47f6)
Change-Id: I4a7f5bb9ad4c27b274f3a3c86c1617ca0578b98f
Elliott Hughes [Tue, 28 Oct 2014 15:36:55 +0000 (15:36 +0000)]
Merge "Don't mask out SA_RESTORER from sa_flags." into lmp-mr1-dev
Elliott Hughes [Tue, 28 Oct 2014 15:06:30 +0000 (15:06 +0000)]
Merge "Disable tzdata in $ANDROID_DATA." into lmp-mr1-dev
Elliott Hughes [Thu, 4 Sep 2014 20:54:42 +0000 (13:54 -0700)]
Don't mask out SA_RESTORER from sa_flags.
glibc doesn't do this, and we probably shouldn't either.
Bug:
16703540
Bug:
17436734
(cherry picked from commit
afe58ad9892de27a7acb0aaded6312ee0f958314)
Change-Id: Iada5d0ae814f438cb276f056b2b5e3675f0e3666
Pavel Chupin [Fri, 26 Sep 2014 12:02:09 +0000 (16:02 +0400)]
[x86,x86_64] Fix libgcc unwinding through signal
This change provides __restore/__restore_rt on x86 and __restore_rt on
x86_64 with unwinding information to be able to unwind through signal
frame via libgcc provided unwinding interface. See comments inlined for
more details.
Also remove the test that had a dependency on
__attribute__((cleanup(foo_cleanup))). It doesn't provide us with any
better test coverage than we have from the newer tests, and it doesn't
work well across a variety architectures (presumably because no one uses
this attribute in the real world).
Tested this on host via bionic-unit-tests-run-on-host on both x86 and
x86-64.
Bug:
17436734
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
(cherry picked from commit
50321e2e66f19998970e59d666bc9af387345b3a)
Change-Id: Iba90e36958b00c7cc7db5eeebf888dc89ce4d619
Elliott Hughes [Thu, 18 Sep 2014 00:21:20 +0000 (17:21 -0700)]
Stack unwinding unit tests.
Bug:
17436734
(cherry picked from commit
bee1993a14b47bc7acda544242f405ae45e42566)
Change-Id: I7205a862ba2c3b474e287f5e9c8982cef4610af9
Elliott Hughes [Tue, 16 Sep 2014 22:49:50 +0000 (15:49 -0700)]
Use the kernel's sa_restorer for aarch64.
gdb was happy with what we had, but libgcc and libunwind weren't.
libgcc is happy with the kernel's restorer (because of the extra nop),
though libunwind looks like it's going to need code changes regardless.
We could make our restorer more like the kernel's one, but why bother
when we can just let the kernel supply the canonical one?
Bug:
17436734
(cherry picked from commit
1cff9a89645a8f362a9ce19c7f9544e98c1fd9e7)
Change-Id: Ie13d73fd97395e1979a67c2294e036a97c50000d
Elliott Hughes [Tue, 16 Sep 2014 20:57:39 +0000 (13:57 -0700)]
Fix 32-bit arm unwinding through signal frames.
gdb was already okay; libgcc and libunwind need a little extra help.
Bug:
17436734
(cherry picked from commit
148dff3ec6114a03acc722ae43990f1b342abad9)
Change-Id: I2cc997017acc57c930284af5264f353656b98c7b
Elliott Hughes [Wed, 10 Sep 2014 22:20:40 +0000 (15:20 -0700)]
Fix signal trampolines.
* LP32 should use sa_restorer too. gdb expects this, and future (>= 3.15) x86
kernels will apparently stop supporting the case where SA_RESTORER isn't
set.
* gdb and libunwind care about the exact instruction sequences, so we need to
modify the code slightly in a few cases to match what they're looking for.
* gdb also cares about the exact function names (for some architectures),
so we need to use __restore and __restore_rt rather than __sigreturn and
__rt_sigreturn.
* It's possible that we don't have a VDSO; dl_iterate_phdr shouldn't assume
that getauxval(AT_SYSINFO_EHDR) will return a non-null pointer.
This fixes unwinding through a signal handler in gdb for all architectures.
It doesn't fix libunwind for arm and arm64. I'll keep investigating that...
(cherry picked from commit
36f451a6d93b6807944d99fa23396e039c47e845)
Bug:
17436734
Change-Id: Ic1ea1184db6655c5d96180dc07bcc09628e647cb
Elliott Hughes [Mon, 27 Oct 2014 20:38:21 +0000 (13:38 -0700)]
Disable tzdata in $ANDROID_DATA.
Bug:
18139284
Change-Id: I2670dc1791d635139a5d39a438dc08777439476b
Elliott Hughes [Fri, 24 Oct 2014 03:29:42 +0000 (20:29 -0700)]
Use mxcr_mask instead of mxcsr_mask to match glibc.
Bug:
18097559
(cherry picked from commit
f485547b9267263e1de220a3cc368deaec367191)
Change-Id: I242105faa8210abc9635a951b25b127cd64ed23c
Elliott Hughes [Wed, 22 Oct 2014 19:31:02 +0000 (12:31 -0700)]
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
(cherry picked from commit
a05c2a2a705c8298154db6665cbbb4dbe3cdbbd5)
Change-Id: If0253cc1515e1bc98e99c6e24eec797836ca7c27
Christopher Ferris [Wed, 22 Oct 2014 20:16:18 +0000 (20:16 +0000)]
Merge "Fix generic __memcpy_chk implementation." into lmp-mr1-dev
Christopher Ferris [Wed, 22 Oct 2014 19:43:44 +0000 (19:43 +0000)]
Merge "Fix race condition in timer disarm/delete." into lmp-mr1-dev
Christopher Ferris [Fri, 17 Oct 2014 21:08:54 +0000 (14:08 -0700)]
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
(cherry pick from commit
7123d4371a5e04337b1de5f8cdf6cdc1e08e9cad)
Change-Id: Ife93bcbfc1949ef29fc8e2dc515b7120632b82b1
Dmitriy Ivanov [Tue, 21 Oct 2014 19:09:18 +0000 (12:09 -0700)]
Rename library_offset to library_fd_offset
replace lseek() and use pread() instead
add test for library_fd_offset > file_size case
Bug:
17762003
(cherry picked from commit
a6c1279098f24a675d0df74ce1946f5d534b425e)
Change-Id: Ie117c745081ee33d07db5341115ff6c8e98b0dec
Ying Wang [Wed, 8 Oct 2014 23:22:03 +0000 (16:22 -0700)]
Build dlext_testzip as custom module.
Use $(BUILD_SYSTEM)/base_rules to build it as custom module, so that
it's exposed to utilities like mm/mmma etc.
Bug:
17887283
Bug:
17762003
(cherry picked from commit
667853d47770fbdb54aaf0b3261b0d4882725770)
Change-Id: I405797d16f20dc09e5d84b93b6727b634db2fc2c
Christopher Ferris [Tue, 21 Oct 2014 02:09:19 +0000 (19:09 -0700)]
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
Change-Id: I73192c915cdacf608521b1792c54e5af14a34907
Dmitriy Ivanov [Sat, 4 Oct 2014 00:52:44 +0000 (17:52 -0700)]
Add file_offset parameter to android_extinfo
Bug:
17762003
(cherry picked from commit
07e5bc152d8a3ad4c50808bb86f3c0f2c5e2f514)
Change-Id: I72d527831384ff5dde013a4c8dfe639fbec165f5
Hans Boehm [Wed, 1 Oct 2014 01:31:04 +0000 (18:31 -0700)]
Make memory_order_acquire visible in global namespace
We were missing that using directive when including <atomic>.
Bug:
17736764
Change-Id: Ie8ca92a952749415567bcd5fa21d56629a364660
(cherry picked from commit
76ac4d0853c3bba0c65edc98a9cdf932c452e252)
Christopher Ferris [Mon, 13 Oct 2014 19:36:56 +0000 (19:36 +0000)]
Merge "Return total footprint, not high water mark." into lmp-mr1-dev
Christopher Ferris [Fri, 10 Oct 2014 15:40:21 +0000 (08:40 -0700)]
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
Change-Id: Id0293a1b50c9b0be8795405049f537a51ab0e8b7
Christopher Ferris [Fri, 10 Oct 2014 20:47:00 +0000 (20:47 +0000)]
am
c891e240: Add back symbols to fix Greed for Glory franchise.
* commit '
c891e24073830e07ba7373dee554ff2c70e1d313':
Add back symbols to fix Greed for Glory franchise.
Elliott Hughes [Thu, 9 Oct 2014 21:01:47 +0000 (14:01 -0700)]
Fix pthread_attr_getstack under valgrind.
valgrind seems to mess with the stack enough that the kernel will
report "[stack:pid]" rather than "[stack]" in /proc/self/maps, so
switch to the task-specific file instead to force "[stack]". (There
are two conditions in the kernel code that decides which form to
output.)
Bug:
17897476
(cherry picked from commit
9afb2f2106a5d659854c175c574c1c31e0e205a2)
Change-Id: I92c331ef6fb5868af49e75bc595710d290a95f5b
Christopher Ferris [Fri, 10 Oct 2014 01:31:01 +0000 (18:31 -0700)]
Add back symbols to fix Greed for Glory franchise.
Bug:
17813018
Change-Id: Id939426ee5303117b9601e7915fcfec5024fc621
Christopher Ferris [Thu, 9 Oct 2014 22:02:00 +0000 (22:02 +0000)]
am
c9734d24: Re-add dlmalloc for 32 bit.
* commit '
c9734d24d92f4737f5ab3808c77d816a1b084582':
Re-add dlmalloc for 32 bit.
Christopher Ferris [Thu, 9 Oct 2014 05:48:20 +0000 (22:48 -0700)]
Re-add dlmalloc for 32 bit.
It turns out that appportable has a version that calls dlmalloc directly.
Re-add the dlmalloc symbol for 32 bit only as a compatibility shim that
calls malloc.
Bug:
17881362
Change-Id: I8f20963b0b8d323489dc083e4063779e0d1d7447
Elliott Hughes [Wed, 8 Oct 2014 05:24:46 +0000 (05:24 +0000)]
am
1543fdf6: Work around a bug in Immersion\'s libImmEmulatorJ.so.
* commit '
1543fdf616ddebee7819214437527f380e5c743b':
Work around a bug in Immersion's libImmEmulatorJ.so.
Dan Albert [Tue, 7 Oct 2014 18:10:36 +0000 (11:10 -0700)]
Inline helpers need to be exported unmangled.
__open_2() is used by the fortify implementation of open(2) in
fcntl.h, and as such needs an unmangled C name. For some reason
(inlining?), this doesn't cause problems at the default optimization
level, but does for -O0.
The rest of these didn't cause build failures, but they look suspect
and probably will, we just haven't caught them yet.
(cherry-pick of
658727e111ed6dee7be5239494f0764f7b1b02f8 with conflicts
in stdio.h and string.h.)
Bug:
17784968
Change-Id: I7391a7a8999ee204eaf6abd14a3d5373ea419d5b
Nick Kralevich [Mon, 6 Oct 2014 21:49:00 +0000 (14:49 -0700)]
cdefs.h: add artificial attribute to FORTIFY_SOURCE functions
Otherwise the gcc compiler warning doesn't show up.
Add -Wno-error to fortify related tests. Fortify related tests
are expected to be examples of bad programs, and in many
cases shouldn't compile cleanly. Rewriting them to compile
cleanly isn't feasible nor desirable.
Bug:
17784968
(cherry picked from commit
1aaa17802c92d99ae170245c2b2f15a6c27b133e)
Change-Id: Ib6df1a3f44b55b1fff222e78395c10c51cd39817
Elliott Hughes [Tue, 7 Oct 2014 23:02:11 +0000 (16:02 -0700)]
Work around a bug in Immersion's libImmEmulatorJ.so.
This library calls pthread_mutex_lock and pthread_mutex_unlock with a NULL
pthread_mutex_t*. This gives them (and their users) one release to fix things.
Bug:
17443936
(cherry picked from commit
7d3f553f989f830976efa92ddc3c84661d4d42aa)
Change-Id: Ie26bbecd3a74d61113b51c18832872499b97ee86
(cherry picked from commit
b5e7eba6d1b97e471996fcfe7dbde7cbba7512ef)
Elliott Hughes [Tue, 7 Oct 2014 23:02:11 +0000 (16:02 -0700)]
Work around a bug in Immersion's libImmEmulatorJ.so.
This library calls pthread_mutex_lock and pthread_mutex_unlock with a NULL
pthread_mutex_t*. This gives them (and their users) one release to fix things.
Bug:
17443936
(cherry picked from commit
7d3f553f989f830976efa92ddc3c84661d4d42aa)
Change-Id: Ie26bbecd3a74d61113b51c18832872499b97ee86
Elliott Hughes [Tue, 7 Oct 2014 18:51:36 +0000 (18:51 +0000)]
Merge "Improve <sys/cdefs.h>." into lmp-mr1-dev
Elliott Hughes [Mon, 18 Aug 2014 21:45:42 +0000 (14:45 -0700)]
Improve <sys/cdefs.h>.
Fix and use __RENAME (and lose ___RENAME --- two underscores should be
enough for anybody). This was the point of this change, because I want
to use __RENAME to support the two basename variants and the two
strerror_r variants.
Lose a bunch of macros that weren't being used.
Lose three dead files from the DNS code.
Bug:
17784968
(cherry picked from commit
2cfb4e8e2e217ef0e4140dcbf9b3da809781158c)
Change-Id: I5e96146f92c0521248c78c0933bec5e9a9818222
Christopher Ferris [Tue, 7 Oct 2014 17:42:39 +0000 (17:42 +0000)]
am
2cf15571: am
40bc7cd4: (-s ours) DO NOT MERGE Re-add .save directive for arm assembler code.
* commit '
2cf155713aaba451065d593335d544f2ada24ddf':
DO NOT MERGE Re-add .save directive for arm assembler code.
Christopher Ferris [Tue, 7 Oct 2014 15:27:36 +0000 (15:27 +0000)]
am
40bc7cd4: (-s ours) DO NOT MERGE Re-add .save directive for arm assembler code.
* commit '
40bc7cd4ed9fb848a7b3d934f69669f64ceed707':
DO NOT MERGE Re-add .save directive for arm assembler code.
Elliott Hughes [Tue, 7 Oct 2014 00:30:34 +0000 (00:30 +0000)]
Merge "further cleanup memcpy fortify implementation" into lmp-mr1-dev
Christopher Ferris [Tue, 7 Oct 2014 00:20:10 +0000 (00:20 +0000)]
am
d11eac34: Force export symbols on all x86 variants in libc.
* commit '
d11eac3455a059a092ceee92eda9905e1d661e94':
Force export symbols on all x86 variants in libc.
Nick Kralevich [Sun, 5 Oct 2014 13:52:24 +0000 (06:52 -0700)]
further cleanup memcpy fortify implementation
Bug:
17784968
(cherry picked from commit
b84f667e9312611536a564700daea11c12b6fcfa)
Change-Id: I68fc2cc0a1ee7f0887edf3681eb83ef678de1383
Christopher Ferris [Mon, 6 Oct 2014 22:11:28 +0000 (15:11 -0700)]
Force export symbols on all x86 variants in libc.
For silvermont, the __popcountsi2 symbol does not get exported by libc.
But for atom, this symbol is exported. Since we already exported this symbol
for previous releases, it's better to just follow through and force
the export, but only for 32 bit. x86 64 bit will not export this symbol.
Bug:
17681440
Change-Id: I6c62245f0960910f64baaaf6d9d090bf3ea5f435
Nick Kralevich [Sat, 4 Oct 2014 22:20:00 +0000 (15:20 -0700)]
string.h: remove unused variable
(cherry picked from commit
48be71d02b6cc4e6493d38cdd6b7779032c38901)
Bug:
17784968
Change-Id: Iac7732fb4f7fe42977cb9f62472bb636e17e5232
Alex Van Brunt [Sat, 4 Oct 2014 16:44:11 +0000 (16:44 +0000)]
am
a5087148: Reimplement clock(3) using clock_gettime(3)
* commit '
a508714800242b294291060641ed35d719bdc857':
Reimplement clock(3) using clock_gettime(3)
Alex Van Brunt [Fri, 26 Sep 2014 20:32:47 +0000 (13:32 -0700)]
Reimplement clock(3) using clock_gettime(3)
Unlike times(), clock_gettime() is implemented as a vDSO on many architectures.
So, using clock_gettime() will return a more accurate time and do so with less
overhead because it does have the overhead of calling into the kernel.
It is also significantly more accurate because it measures the actual time in
nanoseconds rather than the number of ticks (typically 1 millisecond or more).
Bug:
17814435
(cherry picked from commit
8d0b2dbf2154d5da17ff09b1d4f864d281362ad2)
Change-Id: Id4945d9f387330518f78669809639952e9227ed9
Elliott Hughes [Sat, 4 Oct 2014 00:06:27 +0000 (00:06 +0000)]
am
ea9800e9: Explain why clock(3) isn\'t broken.
* commit '
ea9800e98598c71fe76c4e2a0d0498b6bd490a83':
Explain why clock(3) isn't broken.
Elliott Hughes [Fri, 12 Sep 2014 23:33:37 +0000 (16:33 -0700)]
Explain why clock(3) isn't broken.
Bug:
17441123
Bug:
17814435
(cherry picked from commit
f83c208b82c78dad07f4065f63bdd354f5ef9951)
Change-Id: I2065afe73b79a8d86404edee16e983625d902cdc
Ningsheng Jian [Tue, 16 Sep 2014 07:22:10 +0000 (15:22 +0800)]
Fix gdb could not get shared library list issue
Get dynamic flags from phdr table's correct entry rather the first
entry, so that the following DT_DEBUG entry can be set.
Also fix the undefined reference to LoadTask::deleter issue under gcc
-O0 option.
Bug:
17524778
(cherry picked from commit
e93be99da0614ff38cbf8b2bb0624ff1dc79b8d0)
Change-Id: I347792dab25c7b19c3fc690e03d20899ce1e26e0
Dmitriy Ivanov [Wed, 1 Oct 2014 23:26:49 +0000 (16:26 -0700)]
L-MR1 specific fixes
Reset soinfo version to 0.
Disable ifunc test for arm64 because of old toolchain
in lmp-mr1-dev branch
Note: this commit should be reverted in -plus-aosp branch.
Change-Id: I2d6d996d43bc35d5d4975c745779f43a988b31e6
Dmitriy Ivanov [Tue, 9 Sep 2014 17:21:42 +0000 (10:21 -0700)]
Fix unload of recursively linked library
Expanded test for recursive libs. Fixed bug with unnecessary
soinfo_free of already loaded library.
(cherry picked from commit
a6ac54a215d6b64f5cc5a59b66c1dbfbb41ea9f5)
Change-Id: I6907c723d9fbdf6b2777f3f236b1e29b0843edd6
Dmitriy Ivanov [Thu, 11 Sep 2014 22:16:03 +0000 (15:16 -0700)]
Add IFUNC support for arm64 and IRELATIVE reloc
There are number of changes in the way IFUNC related relocations are done:
1. IRELATIVE relocations are now supported for x86/x86_64 and arm64.
2. IFUNC relocations are now relying on static linker to generate
them in correct order - this removes necessety of additional
relocation pass for ifuncs.
3. Related to 2: rela?.dyn relocations are preformed before .plt ones.
4. Ifunc are resolved on symbol lookup this approach allowed to avoid
mprotect(PROT_WRITE) call on r-x program segments.
Bug:
17399706
Bug:
17177284
(cherry picked from commit
9aea164457c269c475592da36b4655d45f55c7bc)
Change-Id: Ie19d900fc203beb93faf8943b0d06d534a6de4ad
Dmitriy Ivanov [Mon, 8 Sep 2014 23:22:22 +0000 (16:22 -0700)]
Refactoring: C++11 style DISABLE_ bionic marcos
Enable the -std=gnu++11 flag for libstdc++ static and
dynamic libs.
ScopeGuard uses DISABLE_ macros instead of '= delete';
(cherry picked from commit
d9ff7226613014056c9edd79a68dc5af939107a0)
Change-Id: If2573d080770e18b36b56106f2369f7bb682cd3c
Dmitriy Ivanov [Thu, 4 Sep 2014 19:47:07 +0000 (12:47 -0700)]
Reset enviroment for math_tests
Bug:
17390824
(cherry picked from commit
7b956ede3f0f40bd8a085a8ad3729bb3e0e030f2)
Change-Id: I5d804ceb5e69533584161bfed6787529cd8296fb
Dmitriy Ivanov [Fri, 5 Sep 2014 23:42:53 +0000 (16:42 -0700)]
Load libraries in breadth-first order
This patch fixes the problem with symbol search order
for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
and ld_preloads in correct order.
Bug: https://code.google.com/p/android/issues/detail?id=74255
Attempt: 2
(cherry picked from commit
14669a939d113214a4a20b9318fca0992d5453f0)
Change-Id: Id87540c96a2242220967b6fa5d84ddcd829e2b97
Dmitriy Ivanov [Fri, 5 Sep 2014 21:57:59 +0000 (14:57 -0700)]
Revert "Load libraries in breadth-first order"
This reverts commit
a3ad450a2e3fb6b3fe359683b247eba20896f646.
(cherry picked from commit
498eb18b82a425f9f30132e4832f327b2ee0e545)
Change-Id: Iec7eab83d0c0ed1604e1e8ea3f9e9d0ce1d29680
Dmitriy Ivanov [Fri, 5 Sep 2014 01:23:00 +0000 (18:23 -0700)]
Fix order of soinfo links (repairs libcxx tests).
(cherry picked from commit
b2a30ee8d209154efc367db11b4167a5d6db605f)
Change-Id: I59c5333bc050cbbea14051cea9220be2f64ee383
Dmitriy Ivanov [Tue, 29 Jul 2014 21:21:45 +0000 (14:21 -0700)]
Load libraries in breadth-first order
This patch fixes the problem with symbol search order
for dlsym(RTLD_DEFAULT/RTLD_NEXT, .) by loading libraries
and ld_preloads in correct order.
Bug: https://code.google.com/p/android/issues/detail?id=74255
(cherry picked from commit
a3ad450a2e3fb6b3fe359683b247eba20896f646)
Change-Id: I1125de10272c84e4f075cbc72859c1f6b3e89943
Chih-Hung Hsieh [Thu, 4 Sep 2014 22:19:52 +0000 (15:19 -0700)]
Enable clang compilation with libc but not linker.
Clang is still disabled for x86 and x86_64 long double code,
for x86_64 special assembly instruction, and the linker module.
BUG:
17163651
BUG:
17302991
BUG:
17403674
(cherry picked from commit
b58db8b083ce41798a5310616e4f20885cec611f)
Change-Id: I916c05056d37a9c287b0a5ae3b1a209d98c8f70e
Dmitriy Ivanov [Tue, 2 Sep 2014 18:47:23 +0000 (11:47 -0700)]
Encapsulate soinfo_link_image and soinfo_relocate
Also get rid of needed[] array for these functions
(cherry picked from commit
29bbc9dd4c606de9187e46d8899a2a744715c967)
Change-Id: Id208621f66afa2e02a6b3facacee7d874466d81b
Dmitriy Ivanov [Tue, 2 Sep 2014 16:45:40 +0000 (09:45 -0700)]
Implement LinkedList::visit()
(cherry picked from commit
a4926058496c1c24c00ac07e42d45048dac7c487)
Change-Id: I59554be45c910bfe33494016595a5ade9daad230
Dmitriy Ivanov [Mon, 1 Sep 2014 23:15:52 +0000 (16:15 -0700)]
Introduce size-based r/w allocators
(cherry picked from commit
0cd83ebb0e9784827d9ec0a8028a710e73a28b2b)
Change-Id: Ib037bd5313c9a78b6051482f14e789aa820b4dd1
Dmitriy Ivanov [Fri, 29 Aug 2014 21:01:48 +0000 (14:01 -0700)]
Erase elements in LinkedList::remove_if
(cherry picked from commit
4bea498544bb1377f610520d7f58856382a6e5fc)
Change-Id: I1ffe248bc2b7572f38fbd987e9c6db5ecbd4559d
Dmitriy Ivanov [Fri, 29 Aug 2014 19:02:36 +0000 (12:02 -0700)]
Replace NULL with nullptr
(cherry picked from commit
851135bf9941b3813adb9b4f43d76e040c4ba157)
Change-Id: Ic4997907680db7472ef38ffb0f0ca66fff37b797
Dmitriy Ivanov [Tue, 26 Aug 2014 22:56:31 +0000 (15:56 -0700)]
Remove unnecessary calls to LinkedList::clear()
(cherry picked from commit
608217e1674d8fd8b334fe18c753b6c4638ed783)
Change-Id: I031359d79b2e77977ace197ef410e41539dc0ce6
Dmitriy Ivanov [Tue, 26 Aug 2014 21:16:52 +0000 (14:16 -0700)]
Enable __cxa_atexit && __cxa_finalize for linker
This allows adding destructors to classes used
for global variables.
(cherry picked from commit
14241402de0faa4b244b1bd6b1f0799ce169b880)
Change-Id: I1d8776130d1e01a8c53d23a2949f5010f4c96b16
Dmitriy Ivanov [Fri, 22 Aug 2014 19:25:04 +0000 (12:25 -0700)]
Bump soinfo version
This includes:
1. Placing has_ifunc after fields with version = 0
2. Switch to has_min_version(v) function.
3. Minor soinfo initialization refactoring (placement new + ctor)
(cherry picked from commit
0d15094287fe0f288d9c258953143fc1998b6b5a)
Change-Id: Idf135fdd3d4826b5653f32add2adc6db5d4a4f95
Dmitriy Ivanov [Thu, 21 Aug 2014 20:54:03 +0000 (13:54 -0700)]
Run constructors before resolving ifunc functions
Bug:
17177284
(cherry picked from commit
9598b8c415e2fa9f240508185fe8c964b83f538d)
Change-Id: I2c9631ee1cd77f8cf95ec0216a35b605c8786454
Brigid Smith [Wed, 23 Jul 2014 18:22:25 +0000 (11:22 -0700)]
Added test for ifunc support in dynamic linker.
ifuncs now work in i386 and x86_64 when called in the same library as
well as in a different library.
Bug:
6657325
(cherry picked from commit
c5a13efa9bc4264be0a9a9e37c00633af01584ed)
Change-Id: I321d780bc2f9bd1baa749e1acacd2683aefe827b
Elliott Hughes [Wed, 1 Oct 2014 18:02:51 +0000 (18:02 +0000)]
Merge "Update bionic to tzdata 2014h." into lmp-mr1-dev
Elliott Hughes [Wed, 1 Oct 2014 00:35:38 +0000 (17:35 -0700)]
Update bionic to tzdata 2014h.
From the release notes:
Changes affecting past time stamps
America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28.
Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on 1924-05-01,
not 1920-01-06. The old entry was based on a misinterpretation of Shanks.
Some more zones have been turned into links, when they differed
from existing zones only for older time stamps. As usual,
these changes affect UTC offsets in pre-1970 time stamps only.
Their old contents have been moved to the 'backzone' file.
The affected zones are: Africa/Blantyre, Africa/Bujumbura,
Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi,
Africa/Lusaka, Africa/Maseru, and Africa/Mbabane.
Bug:
17731498
(cherry picked from commit
0c8fb51e6b8cfcd00d453cb5ebfa516f02009854)
Change-Id: Icf8a9cbd309951b4ffc20c74eb1e78c1e39c222f
Elliott Hughes [Wed, 1 Oct 2014 00:30:01 +0000 (17:30 -0700)]
Fix update-tzdata.py to rebuild icu4c .dat file.
Bug:
17731498
(cherry picked from commit
f8896c6c93fd698b129742780878123a3a19ae07)
Change-Id: If97e1ccf593a2ed6c2356077e660d6fd88a05875
Elliott Hughes [Thu, 25 Sep 2014 03:06:29 +0000 (03:06 +0000)]
Merge "Re-expose more stdio implementation details for LP32." into lmp-dev
Elliott Hughes [Thu, 25 Sep 2014 00:20:53 +0000 (17:20 -0700)]
Re-expose more stdio implementation details for LP32.
Keeps a variety of apps running.
Bug:
17047819
Change-Id: I55882ec95f2b59a5df76e5a89c23aa315609e01d
Christopher Ferris [Wed, 24 Sep 2014 23:01:18 +0000 (16:01 -0700)]
Fix sys_stat.mkfifo when not run as root.
It's not allowed for a shell user to create a fifo in /data/local/tmp.
Make the test do nothing if not run as root.
Bug:
17646702
Change-Id: I932262fa233eae8b5dd607a2398a47c50a208701
Dan Albert [Tue, 23 Sep 2014 22:32:24 +0000 (15:32 -0700)]
Fix incorrect parameter types for locale funcs.
strtoll(3), strtoull(3), wcstoll(3), and wcstoull(3) all take an _int_
as a base, not a size_t. This is an ABI compatibility issue.
Bug:
17628622
Change-Id: I17f8eead34ce2112005899fc30162067573023ec
(cherry picked from commit
3c5037f1b3b747e79d17a5f717d9f9c365132d33)