Commit graph

35713 commits

Author SHA1 Message Date
Christopher Ferris
8f9713e237 Fix broken return code of M_INITIALIZE_GWP_ASAN.
When calling android_mallopt using M_INITIALIZE_GWP_ASAN, nothing
was being returned. Fix this, add a test, and also refactor the
code a bit so dynamic and static share the same code.

Test: Unit tests pass in dynamic and static versions.
Test: Passed using both jemalloc and scudo.
Change-Id: Ibe54b6ccabdbd44d2378892e793df393978bc02b
2021-09-20 18:07:07 -07:00
Treehugger Robot
d036625460 Merge "Use the BSD license for our bogus fts.h." am: e8121199fd am: 9ed43777fe am: d5476e0348
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1826812

Change-Id: Ib4f723ba2205cf3be7717f65ad0768e5cd34c691
2021-09-14 23:49:44 +00:00
Treehugger Robot
d5476e0348 Merge "Use the BSD license for our bogus fts.h." am: e8121199fd am: 9ed43777fe
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1826812

Change-Id: I003c06fb1219aee51bf5c02e3df4d8e1f745fd30
2021-09-14 23:33:54 +00:00
Treehugger Robot
9ed43777fe Merge "Use the BSD license for our bogus fts.h." am: e8121199fd
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1826812

Change-Id: Ib06ae198d46177c27bca7827855e66e2101150af
2021-09-14 22:32:33 +00:00
Treehugger Robot
e8121199fd Merge "Use the BSD license for our bogus fts.h." 2021-09-14 22:11:31 +00:00
Elliott Hughes
c7fe26aa82 Use the BSD license for our bogus fts.h.
...since the implementation is BSD. I missed this in the original code
review (and the presubmit hooks were skipped, so the machines didn't
notice).

Test: N/A
Change-Id: Ia9fe067c68b3ab8045d3f5dfe256f3200f102fbf
2021-09-14 12:26:08 -07:00
Elliott Hughes
f1043c4b24 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." am: dc448a82b1 am: 5356f2de42 am: 2288ede403
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819299

Change-Id: I9eabdad28762272320c26d2b3ec57647b18fbe4b
2021-09-10 21:54:21 +00:00
Elliott Hughes
2288ede403 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." am: dc448a82b1 am: 5356f2de42
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819299

Change-Id: I074e9818b3929875e167c1779260c8ece731b888
2021-09-10 21:39:12 +00:00
Elliott Hughes
5356f2de42 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." am: dc448a82b1
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819299

Change-Id: I4f8b81ba63cd9b5284d18ec026a1b69cfa260872
2021-09-10 21:24:01 +00:00
Elliott Hughes
dc448a82b1 Merge "Use lp64 rather than explicitly saying "arm64,x86_64"." 2021-09-10 21:12:43 +00:00
Treehugger Robot
16bebb0482 Merge changes Ifac9a59e,I213d423a am: 406589b975 am: d87aa4117b am: d0fa82378a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819303

Change-Id: I10a735b4e480b23b4111cb380b310ec1f5f1edfc
2021-09-09 04:58:32 +00:00
Treehugger Robot
d0fa82378a Merge changes Ifac9a59e,I213d423a am: 406589b975 am: d87aa4117b
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819303

Change-Id: Iebc1ee0abdcd214266980cdaee278112826601e8
2021-09-09 04:43:43 +00:00
Treehugger Robot
d87aa4117b Merge changes Ifac9a59e,I213d423a am: 406589b975
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1819303

Change-Id: Iae2b9bb2b8b65df0bb4695d09ed4d64a790fd3d0
2021-09-09 04:28:56 +00:00
Treehugger Robot
406589b975 Merge changes Ifac9a59e,I213d423a
* changes:
  Export fts as a static library for use with musl
  Compile fts.c in libc_openbsd_ndk
2021-09-09 04:15:12 +00:00
Treehugger Robot
a2023096e6 Merge "Add API level define for T." am: 41fed4d461 am: a64e82b278 am: e5b006be10
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1822489

Change-Id: I8d7d9dffe46e1a7d08d8b6ff687aec268fc66b50
2021-09-09 01:23:54 +00:00
Treehugger Robot
e5b006be10 Merge "Add API level define for T." am: 41fed4d461 am: a64e82b278
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1822489

Change-Id: Icc12d44184e1e589fca31e99b38782fc8299eeda
2021-09-09 01:08:45 +00:00
Treehugger Robot
a64e82b278 Merge "Add API level define for T." am: 41fed4d461
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1822489

Change-Id: I3223faa589746b5a7c3f0613f42e75927f30224f
2021-09-09 00:49:48 +00:00
Treehugger Robot
41fed4d461 Merge "Add API level define for T." 2021-09-09 00:39:27 +00:00
Colin Cross
048f24ed2a Export fts as a static library for use with musl
musl libc doesn't provide fts, but elfutils and libabigail need it.
Export bionic's fts as a staic library that can be linked into elfutils
and libabigail when compiling against musl.

fts uses recallocarray, which musl doesn't provide, so also include
recallocarray.c in libfts.a.

Requires minor tweaks to fts.c and a wrapper around fts.h to make them
compatible with musl, primarily by providing local definitions of macros
provided in bionic's sys/cdefs.h.

Bug: 190084016
Test: m libfts
Change-Id: Ifac9a59e7504c0c1f5f8a3a5bd3c19a13980b83c
2021-09-08 15:53:10 -07:00
Dan Albert
e791552fbb Add API level define for T.
Test: treehugger
Bug: None
Change-Id: I7a973bbd7e8d646f45f4d860d564f9f104aab134
2021-09-08 14:57:46 -07:00
Colin Cross
69bcb8be27 Compile fts.c in libc_openbsd_ndk
fts.c is from openbsd and has compatibility macros to make it compile
as part of bionic.  Move it into libc_openbsd_ndk where it will
get the workarounds from -include openbsd-compat.h instead.

Test: m libc
Change-Id: I213d423af8f010e39460b611e902acbf3561ae7a
2021-09-08 13:26:46 -07:00
Elliott Hughes
de1cf85795 Use lp64 rather than explicitly saying "arm64,x86_64".
We'd missed a couple, but these seem to be the last...

Test: treehugger
Change-Id: Ic9808c5171b6c826d2d251c14687142280331efd
2021-09-07 09:17:14 -07:00
Christopher Ferris
a4ded0645a Merge "Update to v5.14 kernel headers." am: 7672be0b3e am: 027ba78669 am: c3af7a1519
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1817057

Change-Id: I7406dd342a88901ecffd8b9a0f23b66bab01ef1d
2021-09-02 21:15:25 +00:00
Christopher Ferris
c3af7a1519 Merge "Update to v5.14 kernel headers." am: 7672be0b3e am: 027ba78669
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1817057

Change-Id: I39b0ac16107fc0e2bd79abb1bda88f555d34930e
2021-09-02 20:59:08 +00:00
Christopher Ferris
027ba78669 Merge "Update to v5.14 kernel headers." am: 7672be0b3e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1817057

Change-Id: Ibd96a173c9df9167ed7f654631a50f6e91047b8d
2021-09-02 20:45:04 +00:00
Christopher Ferris
7672be0b3e Merge "Update to v5.14 kernel headers." 2021-09-02 20:27:08 +00:00
Christopher Ferris
3a39c0bc43 Update to v5.14 kernel headers.
Kernel headers coming from:

Git: https://android.googlesource.com/kernel/common/
Branch: android-mainline
Tag: android-mainline-5.14

Test: Builds, bionic unit tests.
Change-Id: Iff3424da9fbf7ae89ebeb6daabb34c4aa650901f
2021-09-02 00:03:38 +00:00
Peter Collingbourne
6882ffc28f Merge "Reland "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." with a fix." am: 563e60e32a am: c0eeb1ba00 am: 871b1bc69f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1809796

Change-Id: I246c372851f227e83c5b2d4460295a3e7ee665da
2021-08-26 22:57:16 +00:00
Peter Collingbourne
871b1bc69f Merge "Reland "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." with a fix." am: 563e60e32a am: c0eeb1ba00
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1809796

Change-Id: Icc748fbe70006efbecf2f48acfd5c389914e72f6
2021-08-26 22:39:16 +00:00
Peter Collingbourne
c0eeb1ba00 Merge "Reland "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." with a fix." am: 563e60e32a
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1809796

Change-Id: I8cdfff5c3f8b1371b553530f1abb47e2bf63f1f5
2021-08-26 22:23:50 +00:00
Peter Collingbourne
563e60e32a Merge "Reland "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." with a fix." 2021-08-26 22:11:31 +00:00
Peter Collingbourne
1583cd286e Reland "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." with a fix.
A recent change to lld [1] made it so that the __rela?_iplt_*
symbols are no longer defined for PIEs and shared libraries. Since
the linker is a PIE, this prevents it from being able to look up
its own relocations via these symbols. We don't need these symbols
to find the relocations however, as their location is available via
the dynamic table. Therefore, start using the dynamic table to find
the relocations instead of using the symbols.

Previously landed in r.android.com/1801427 and reverted in
r.android.com/1804876 due to linux-bionic breakage. This time,
search .rela.dyn as well as .rela.plt, since the linker may put the
relocations in either location (see [2]).

[1] f8cb78e99a
[2] https://reviews.llvm.org/D65651

Bug: 197420743
Change-Id: I5bef157472e9893822e3ca507ef41a15beefc6f1
2021-08-26 11:48:19 -07:00
Treehugger Robot
d7e1cbf017 Merge "Revert "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs."" am: 957d6d513e am: 93ae7b1083 am: 940be88136
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804876

Change-Id: Id37993fea995773ce16d3b2f4ebd46c1e5402d69
2021-08-26 02:41:21 +00:00
Treehugger Robot
940be88136 Merge "Revert "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs."" am: 957d6d513e am: 93ae7b1083
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804876

Change-Id: I11f7edcccb4f9ff0e8c0fa806a82e194a9ac2c78
2021-08-26 02:26:35 +00:00
Treehugger Robot
93ae7b1083 Merge "Revert "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs."" am: 957d6d513e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804876

Change-Id: I416f4a6262f8a8ebd5df290bfd5745e932d5c529
2021-08-26 02:16:40 +00:00
Treehugger Robot
957d6d513e Merge "Revert "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs."" 2021-08-26 02:03:28 +00:00
ycheo
e5570c5dfe Revert "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs."
This reverts commit 65bdf655c4.

Reason for revert: checking the failure of avd/avd_boot_test
Bug: 197781964
Change-Id: I70eb03b45cdfbd87ef6edb03b74ad6d1970dc08c
2021-08-26 00:31:51 +00:00
Treehugger Robot
3edf46e3a9 Merge "Export memalign to linker" am: 9f99a046b9 am: 34c8681701 am: 71726d5bd5
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1788557

Change-Id: I4e65d0a82643d70967b394dfbab282286c909fda
2021-08-25 03:01:21 +00:00
Treehugger Robot
71726d5bd5 Merge "Export memalign to linker" am: 9f99a046b9 am: 34c8681701
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1788557

Change-Id: I4e641302bfd47130bf47f57a289b19491e477b96
2021-08-25 02:46:27 +00:00
Treehugger Robot
34c8681701 Merge "Export memalign to linker" am: 9f99a046b9
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1788557

Change-Id: I3daf3a6b62e58e16a115a055956d1d99b05d9973
2021-08-25 02:32:14 +00:00
Treehugger Robot
9f99a046b9 Merge "Export memalign to linker" 2021-08-25 02:14:15 +00:00
Pirama Arumuga Nainar
bb1aad6b15 Merge "[libm] Set pragma FENV_EACCESS for x86_64, i386" am: 057219b3f3 am: ba0a1e7397 am: 9a08480dd7
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804297

Change-Id: I27ad0d06baff81ecc87593cd9e0214e3285fea6d
2021-08-23 19:06:11 +00:00
Pirama Arumuga Nainar
9a08480dd7 Merge "[libm] Set pragma FENV_EACCESS for x86_64, i386" am: 057219b3f3 am: ba0a1e7397
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804297

Change-Id: I0f81580ac432e5e76339afedfcaa7214e5488a0d
2021-08-23 18:54:42 +00:00
Pirama Arumuga Nainar
ba0a1e7397 Merge "[libm] Set pragma FENV_EACCESS for x86_64, i386" am: 057219b3f3
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1804297

Change-Id: I1766efa6caeb7b4e406b2c37add152a30cf5fbd8
2021-08-23 18:38:21 +00:00
Pirama Arumuga Nainar
057219b3f3 Merge "[libm] Set pragma FENV_EACCESS for x86_64, i386" 2021-08-23 18:25:33 +00:00
Treehugger Robot
524d5a6dbf Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." am: 15681db86e am: 754fd6872f am: 5126a1b349
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1801427

Change-Id: Ibb8bc77a21ba263b57296cf72f54ae5d3af204ad
2021-08-20 22:27:59 +00:00
Treehugger Robot
5126a1b349 Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." am: 15681db86e am: 754fd6872f
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1801427

Change-Id: I2fbb3b367df082dbd68b780a21eb9a7fef56f264
2021-08-20 22:03:30 +00:00
Treehugger Robot
754fd6872f Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." am: 15681db86e
Original change: https://android-review.googlesource.com/c/platform/bionic/+/1801427

Change-Id: Ibdd2529f565dbd9a3304aec5d89e8c0c71f9ac0c
2021-08-20 21:50:50 +00:00
Pirama Arumuga Nainar
0c3bb2cf8f [libm] Set pragma FENV_EACCESS for x86_64, i386
Bug: http://b/157914307

This pragma enables
- -frounding-math, i.e. rounding mode set at runtime are honored
- -ffp-exception-behavior=strict, i.e. FPE semantics are preserved.
- Prevents use of FMA instructions.

Test: Build toolchain without revert https://r.android.com/1298100
      and run bionic-unit-tests.math_h*
Change-Id: I6249b20c93e0fd4ebbdfbe433da4ad4a65d3747b
2021-08-20 14:49:17 -07:00
Treehugger Robot
15681db86e Merge "Use the dynamic table instead of __rela?_iplt_* to find the linker's IRELATIVE relocs." 2021-08-20 21:33:17 +00:00