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()`.)
51 KiB
51 KiB