diff options
author | Fangrui Song <i@maskray.me> | 2022-02-22 10:07:58 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-02-22 10:07:58 -0800 |
commit | 88d66f6ed1e5a3a9370a3181b7307fe65590e3ac (patch) | |
tree | c909343ebb570de9543ac956c65012c5cee613ca /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 104d9a674312c314699558ad8ee48b70624fdb6c (diff) | |
download | llvm-88d66f6ed1e5a3a9370a3181b7307fe65590e3ac.zip llvm-88d66f6ed1e5a3a9370a3181b7307fe65590e3ac.tar.gz llvm-88d66f6ed1e5a3a9370a3181b7307fe65590e3ac.tar.bz2 |
[ELF] Move duplicate symbol check after input file parsing
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. It is placed after compileBitcodeFiles to apply to ET_REL files
produced by LTO. This causes minor diagnostic regression
for skipLinkedOutput configurations: ld.lld --thinlto-index-only a.bc b.o
(bitcode definition prevails) won't detect duplicate symbol error. I think this
is an acceptable compromise. The important cases where (a) both files are
bitcode or (b) --thinlto-index-only is unused are still detected.
Reviewed By: ikudrin
Differential Revision: https://reviews.llvm.org/D119908
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions