summaryrefslogtreecommitdiff
path: root/ELF/InputSection.cpp
diff options
context:
space:
mode:
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: