summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index f937d1c411d..7ffa6d2b9cc 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -332,6 +332,9 @@ template <class ELFT> void Writer<ELFT>::createSections() {
Map.lookup({".init_array", SHT_INIT_ARRAY, SHF_WRITE | SHF_ALLOC})) {
Symtab.addSyntheticSym<ELFT>("__init_array_start", *OS, 0);
Symtab.addSyntheticSym<ELFT>("__init_array_end", *OS, OS->getSize());
+ } else {
+ Symtab.addIgnoredSym<ELFT>("__init_array_start");
+ Symtab.addIgnoredSym<ELFT>("__init_array_end");
}
// FIXME: Try to avoid the extra walk over all global symbols.
OpenPOWER on IntegriCloud