aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2025-01-24 13:14:21 -0500
committerGitHub <noreply@github.com>2025-01-24 13:14:21 -0500
commitd9b8120259a546ce7aa9f047566fef29479f59e8 (patch)
tree1b60bf8b2f399191d48deadfb805ae2b3ff1cb65 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parent544a3cb65b6b9b1455f9294d1764f47a7b8673b7 (diff)
downloadllvm-d9b8120259a546ce7aa9f047566fef29479f59e8.zip
llvm-d9b8120259a546ce7aa9f047566fef29479f59e8.tar.gz
llvm-d9b8120259a546ce7aa9f047566fef29479f59e8.tar.bz2
[lld/COFF] Fix -start-lib / -end-lib more after reviews.llvm.org/D116434 (#124294)
This is a follow-up to #120452 in a way. Since lld/COFF does not yet insert all defined in an obj file before all undefineds (ELF and MachO do this, see #67445 and things linked from there), it's possible that: 1. We add an obj file a.obj 2. a.obj contains an undefined that's in b.obj, causing b.obj to be added 3. b.obj contains an undefined that's in a part of a.obj that's not yet in the symbol table, causing a recursive load of a.obj, which adds the symbols in there twice, leading to duplicate symbol errors. For normal archives, `ArchiveFile::addMember()` has a `seen` check to prevent this. For start-lib lazy objects, we can just check if the archive is still lazy at the recursive call. This bug is similar to issue #59162. (Eventually, we'll probably want to do what the MachO and ELF ports do.) Includes a test that caused duplicate symbol diagnostics before this code change.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions