ELFObjectWriter: Delete redundant registerSymbol
authorFangrui Song <i@maskray.me>
Sat, 13 Feb 2021 20:01:37 +0000 (12:01 -0800)
committerFangrui Song <i@maskray.me>
Sat, 13 Feb 2021 20:01:37 +0000 (12:01 -0800)
MCELFStreamer::changeSection has registered the group signature symbol.

llvm/lib/MC/ELFObjectWriter.cpp

index f7d8837..714fc98 100644 (file)
@@ -1119,7 +1119,6 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
     MCSectionELF *RelSection = createRelocationSection(Ctx, Section);
 
     if (SignatureSymbol) {
-      Asm.registerSymbol(*SignatureSymbol);
       unsigned &GroupIdx = RevGroupMap[SignatureSymbol];
       if (!GroupIdx) {
         MCSectionELF *Group = Ctx.createELFGroupSection(SignatureSymbol);