diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-12-13 16:59:52 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-12-13 16:59:52 +0000 |
commit | 83b9c92266d6b0e219d89198b15d0c6a69f94e06 (patch) | |
tree | 1aabb320d936f27915ed95e4d5a028f390710cb0 | |
parent | e4ceb066c3ab2409b836fc5566b211cd6b91c3f4 (diff) | |
parent | 907d4dcae4e74c2548299013498f8ab84a9c1526 (diff) | |
download | bionic-83b9c92266d6b0e219d89198b15d0c6a69f94e06.tar.gz |
Merge "Reserve TLS slot for native bridge" into main am: 0144257234 am: 907d4dcae4
Original change: https://android-review.googlesource.com/c/platform/bionic/+/2824791
Change-Id: Ie0925e3edb4f48ee23cd122a482ba251e02137db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | libc/platform/bionic/tls_defines.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libc/platform/bionic/tls_defines.h b/libc/platform/bionic/tls_defines.h index 3e2efa36a..8fe8701af 100644 --- a/libc/platform/bionic/tls_defines.h +++ b/libc/platform/bionic/tls_defines.h @@ -68,6 +68,11 @@ // // - TLS_SLOT_APP: Available for use by apps in Android Q and later. (This slot // was used for errno in P and earlier.) +// +// - TLS_SLOT_NATIVE_BRIDGE_GUEST_STATE: Pointer to the guest state for native +// bridge implementations. It is (to be) used by debuggerd to access this +// state for guest aware crash reporting of the binary translated code. +// (Introduced in V) #if defined(__arm__) || defined(__aarch64__) @@ -80,7 +85,8 @@ // [1] "Addenda to, and Errata in, the ABI for the ARM Architecture". Section 3. // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045e/IHI0045E_ABI_addenda.pdf -#define MIN_TLS_SLOT (-1) // update this value when reserving a slot +#define MIN_TLS_SLOT (-2) // update this value when reserving a slot +#define TLS_SLOT_NATIVE_BRIDGE_GUEST_STATE (-2) #define TLS_SLOT_BIONIC_TLS (-1) #define TLS_SLOT_DTV 0 #define TLS_SLOT_THREAD_ID 1 @@ -112,7 +118,8 @@ #define TLS_SLOT_ART_THREAD_SELF 7 #define TLS_SLOT_DTV 8 #define TLS_SLOT_BIONIC_TLS 9 -#define MAX_TLS_SLOT 9 // update this value when reserving a slot +#define TLS_SLOT_NATIVE_BRIDGE_GUEST_STATE 10 +#define MAX_TLS_SLOT 10 // update this value when reserving a slot #elif defined(__riscv) @@ -123,8 +130,9 @@ // [1]: RISC-V ELF Specification. Section: Thread Local Storage // https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#thread-local-storage -#define MIN_TLS_SLOT (-9) // update this value when reserving a slot +#define MIN_TLS_SLOT (-10) // update this value when reserving a slot +#define TLS_SLOT_NATIVE_BRIDGE_GUEST_STATE (-10) #define TLS_SLOT_BIONIC_TLS (-9) #define TLS_SLOT_DTV (-8) #define TLS_SLOT_THREAD_ID (-7) |