aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2024-12-19 11:22:29 -0500
committerGitHub <noreply@github.com>2024-12-19 11:22:29 -0500
commit2b6713d3b87d6e0bf562cf10ef620a12328c4106 (patch)
tree1b1ba4e4de440d9589b454e834e5d9b6202f1744 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp
parent4039a79de71bd969ef5bf944fd9f46430338ff7e (diff)
downloadllvm-2b6713d3b87d6e0bf562cf10ef620a12328c4106.zip
llvm-2b6713d3b87d6e0bf562cf10ef620a12328c4106.tar.gz
llvm-2b6713d3b87d6e0bf562cf10ef620a12328c4106.tar.bz2
[lld/coff] Fix assert on /start-lib foo.obj /end-lib during eager loads (#120292)
If foo.obj is eagerly loaded (due to a prior undef referencing one if its symbols) and has more than one symbol, we used to assert: SymbolTable::addLazyObject() for the first symbol would set `lazy` to false and load all symbols from the file, but the outer ObjFile::parseLazy() loop would continue to run and call addLazyObject() for the second symbol, which would assert. Instead, just stop adding lazy symbols if the file got loaded for real while adding a symbol. (The ELF port has a similar early exit in `ObjFile<ELFT>::parseLazy()`.)
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
0 files changed, 0 insertions, 0 deletions