StaticTlsLayout: add exe/tcb and solib layout
Replace reserve_tcb with reserve_exe_segment_and_tcb, which lays out both
the TCB and the executable's TLS segment, accounting for the difference in
layout between variant 1 and variant 2 targets.
The function isn't actually called with a non-null TlsSegment* yet.
Bug: http://b/78026329
Test: bionic unit tests
Change-Id: Ibd6238577423a7d0451f36da7e64912046959796
diff --git a/linker/linker_tls.cpp b/linker/linker_tls.cpp
index 3327453..c0ebf25 100644
--- a/linker/linker_tls.cpp
+++ b/linker/linker_tls.cpp
@@ -41,7 +41,7 @@
// Stub for linker static TLS layout.
void layout_linker_static_tls() {
StaticTlsLayout& layout = __libc_shared_globals()->static_tls_layout;
- layout.reserve_tcb();
+ layout.reserve_exe_segment_and_tcb(nullptr);
// The pthread key data is located at the very front of bionic_tls. As a
// temporary workaround, allocate bionic_tls just after the thread pointer so