diff options
author | Nico Weber <thakis@chromium.org> | 2024-12-19 11:22:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-19 11:22:29 -0500 |
commit | 2b6713d3b87d6e0bf562cf10ef620a12328c4106 (patch) | |
tree | 1b1ba4e4de440d9589b454e834e5d9b6202f1744 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp | |
parent | 4039a79de71bd969ef5bf944fd9f46430338ff7e (diff) | |
download | llvm-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