Add comments.
llvm-svn: 295280
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 9a1741f..3fd1ab9 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1184,6 +1184,7 @@
}
template <class ELFT> void Writer<ELFT>::addPredefinedSections() {
+ // Add BSS sections.
auto Add = [=](OutputSection<ELFT> *Sec) {
if (!Sec->Sections.empty()) {
Sec->assignOffsets();
@@ -1193,6 +1194,8 @@
Add(Out<ELFT>::Bss);
Add(Out<ELFT>::BssRelRo);
+ // ARM ABI requires .ARM.exidx to be terminated by some piece of data.
+ // We have the terminater synthetic section class. Add that at the end.
auto *OS = dyn_cast_or_null<OutputSection<ELFT>>(findSection(".ARM.exidx"));
if (OS && !OS->Sections.empty() && !Config->Relocatable)
OS->addSection(make<ARMExidxSentinelSection<ELFT>>());