[lld] r295280 - Add comments.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 20:19:03 PST 2017
Author: ruiu
Date: Wed Feb 15 22:19:03 2017
New Revision: 295280
URL: http://llvm.org/viewvc/llvm-project?rev=295280&view=rev
Log:
Add comments.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=295280&r1=295279&r2=295280&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Wed Feb 15 22:19:03 2017
@@ -1184,6 +1184,7 @@ template <class ELFT> void Writer<ELFT>:
}
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 @@ template <class ELFT> void Writer<ELFT>:
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>>());
More information about the llvm-commits
mailing list