[lld] r262735 - Add a comment about _DYNAMIC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 10:34:14 PST 2016
Author: ruiu
Date: Fri Mar 4 12:34:14 2016
New Revision: 262735
URL: http://llvm.org/viewvc/llvm-project?rev=262735&view=rev
Log:
Add a comment about _DYNAMIC.
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=262735&r1=262734&r2=262735&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Mar 4 12:34:14 2016
@@ -1013,6 +1013,11 @@ template <class ELFT> bool Writer<ELFT>:
for (OutputSectionBase<ELFT> *Sec : RegularSections)
addStartStopSymbols(Sec);
}
+
+ // Add _DYNAMIC symbol. Unlike GNU gold, our _DYNAMIC symbol has no type.
+ // It should be okay as no one seems to care about the type.
+ // Even the author of gold doesn't remember why gold behaves that way.
+ // https://sourceware.org/ml/binutils/2002-03/msg00360.html
if (isOutputDynamic())
Symtab.addSynthetic("_DYNAMIC", *Out<ELFT>::Dynamic, 0, STV_HIDDEN);
More information about the llvm-commits
mailing list