diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
| -rw-r--r-- | lld/ELF/Writer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 6f652ac820a..ac3497045d8 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -170,7 +170,7 @@ static Defined *addOptionalRegular(StringRef Name, SectionBase *Sec, Symbol *S = Symtab->find(Name); if (!S || S->isDefined()) return nullptr; - Symbol *Sym = Symtab->addRegular(Name, StOther, STT_NOTYPE, Val, + Symbol *Sym = Symtab->addDefined(Name, StOther, STT_NOTYPE, Val, /*Size=*/0, Binding, Sec, /*File=*/nullptr); return cast<Defined>(Sym); @@ -1550,7 +1550,7 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() { // Even the author of gold doesn't remember why gold behaves that way. // https://sourceware.org/ml/binutils/2002-03/msg00360.html if (In.DynSymTab) - Symtab->addRegular("_DYNAMIC", STV_HIDDEN, STT_NOTYPE, 0 /*Value*/, + Symtab->addDefined("_DYNAMIC", STV_HIDDEN, STT_NOTYPE, 0 /*Value*/, /*Size=*/0, STB_WEAK, In.Dynamic, /*File=*/nullptr); |

