summaryrefslogtreecommitdiffstats
path: root/lld/ELF/SyntheticSections.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
-rw-r--r--lld/ELF/SyntheticSections.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 4a4fa5b6962..cb91596f21f 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -376,12 +376,15 @@ void BuildIdSection<ELFT>::computeHash(
HashFn(HashBuf, Hashes);
}
-template <class ELFT>
-CopyRelSection<ELFT>::CopyRelSection(bool ReadOnly, uint32_t Alignment,
- size_t S)
- : SyntheticSection(SHF_ALLOC, SHT_NOBITS, Alignment,
- ReadOnly ? ".bss.rel.ro" : ".bss"),
- Size(S) {}
+BssSection::BssSection(StringRef Name)
+ : SyntheticSection(SHF_ALLOC | SHF_WRITE, SHT_NOBITS, 0, Name) {}
+
+size_t BssSection::reserveSpace(uint32_t Alignment, size_t Size) {
+ OutSec->updateAlignment(Alignment);
+ this->Size = alignTo(this->Size, Alignment) + Size;
+ this->Alignment = std::max<uint32_t>(this->Alignment, Alignment);
+ return this->Size - Size;
+}
template <class ELFT>
void BuildIdSection<ELFT>::writeBuildId(ArrayRef<uint8_t> Buf) {
@@ -2260,6 +2263,8 @@ InputSection *ThunkSection::getTargetInputSection() const {
}
InputSection *InX::ARMAttributes;
+BssSection *InX::Bss;
+BssSection *InX::BssRelRo;
InputSection *InX::Common;
StringTableSection *InX::DynStrTab;
InputSection *InX::Interp;
@@ -2312,11 +2317,6 @@ template class elf::BuildIdSection<ELF32BE>;
template class elf::BuildIdSection<ELF64LE>;
template class elf::BuildIdSection<ELF64BE>;
-template class elf::CopyRelSection<ELF32LE>;
-template class elf::CopyRelSection<ELF32BE>;
-template class elf::CopyRelSection<ELF64LE>;
-template class elf::CopyRelSection<ELF64BE>;
-
template class elf::GotSection<ELF32LE>;
template class elf::GotSection<ELF32BE>;
template class elf::GotSection<ELF64LE>;
OpenPOWER on IntegriCloud