diff options
author | Rui Ueyama <ruiu@google.com> | 2016-03-04 18:34:14 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-03-04 18:34:14 +0000 |
commit | d4530c6eb8653c346d2845b6565f8869dcd49d41 (patch) | |
tree | f3a89c1b00c472db68a7cfe46d97befaf4397510 | |
parent | 6534a8a837a6a6bf9a6e38b214c9b9faaa532ac1 (diff) | |
download | bcm5719-llvm-d4530c6eb8653c346d2845b6565f8869dcd49d41.tar.gz bcm5719-llvm-d4530c6eb8653c346d2845b6565f8869dcd49d41.zip |
Add a comment about _DYNAMIC.
llvm-svn: 262735
-rw-r--r-- | lld/ELF/Writer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 68c1007185f..961f47d0f81 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1013,6 +1013,11 @@ template <class ELFT> bool Writer<ELFT>::createSections() { 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); |