[PATCH] D119908: [ELF] Move duplicate symbol check after input file parsing

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 18:13:37 PST 2022


MaskRay created this revision.
MaskRay added reviewers: bd1976llvm, ikudrin, peter.smith.
Herald added subscribers: arichardson, emaste.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

https://discourse.llvm.org/t/parallel-input-file-parsing/60164

To decouple symbol initialization and section initialization, `Defined::section`
assignment should be postponed after input file parsing. To avoid spurious
duplicate definition error due to two definitions in COMDAT groups of the same
signature, we should postpone the duplicate symbol check.

The function is called postScan instead of a more specific name like
checkDuplicateSymbols, because we may merge Symbol::mergeProperties into
postScan.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119908

Files:
  lld/ELF/Driver.cpp
  lld/ELF/InputFiles.cpp
  lld/ELF/InputFiles.h
  lld/ELF/SymbolTable.cpp
  lld/ELF/SymbolTable.h
  lld/ELF/Symbols.cpp
  lld/ELF/Symbols.h
  lld/test/ELF/invalid/symtab-sh-info-dup.test
  lld/test/ELF/vs-diagnostics-duplicate.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119908.409113.patch
Type: text/x-patch
Size: 11015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220216/648f88b8/attachment.bin>


More information about the llvm-commits mailing list