Previously, if a symbol function was undefined, LLD was trying to print its referenced locations, and was failing with two different errors:
- Stream Error: The specified offset is invalid for the current stream
- CodeView Error: There are no records
Nothing else was printed.
The fix covers these two cases: one is a Lines subsection without anything in it; the other is when the provided Addr param is <= Line.Offset.
The original OBJ was compiled with Clang. The provided test is simply a reduction of our case.
The source of these two bugs seems to lie in how Clang emits Lines subsections; however I wanted to ensure LLD handles these correctly first.