summaryrefslogtreecommitdiff
path: root/ELF/InputSection.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-06-11 18:17:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-06-11 18:17:23 +0000
commit444e4712399dfed9a74a0a1bd4880ea138a86616 (patch)
tree2ad18ed0a15e9e8be17fbfe03f5221304008ee59 /ELF/InputSection.cpp
parent515d6c5d32e49955108e6171dfff4d49d9c5cbfb (diff)
Notes
Diffstat (limited to 'ELF/InputSection.cpp')
-rw-r--r--ELF/InputSection.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/ELF/InputSection.cpp b/ELF/InputSection.cpp
index 839bff7011eb..ca2f49c07bb7 100644
--- a/ELF/InputSection.cpp
+++ b/ELF/InputSection.cpp
@@ -248,6 +248,7 @@ void InputSectionBase::parseCompressedHeader() {
}
UncompressedSize = Hdr->ch_size;
+ Alignment = std::max<uint64_t>(Hdr->ch_addralign, 1);
RawData = RawData.slice(sizeof(*Hdr));
return;
}
@@ -265,6 +266,7 @@ void InputSectionBase::parseCompressedHeader() {
}
UncompressedSize = Hdr->ch_size;
+ Alignment = std::max<uint64_t>(Hdr->ch_addralign, 1);
RawData = RawData.slice(sizeof(*Hdr));
}
@@ -578,10 +580,6 @@ static int64_t getTlsTpOffset() {
// Variant 1. The thread pointer points to a TCB with a fixed 2-word size,
// followed by a variable amount of alignment padding, followed by the TLS
// segment.
- //
- // NB: While the ARM/AArch64 ABI formally has a 2-word TCB size, lld
- // effectively increases the TCB size to 8 words for Android compatibility.
- // It accomplishes this by increasing the segment's alignment.
return alignTo(Config->Wordsize * 2, Out::TlsPhdr->p_align);
case EM_386:
case EM_X86_64: