COFF: Handle references from LTO object to lazy symbols correctly.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 9 Jun 2015 04:29:54 +0000 (04:29 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 9 Jun 2015 04:29:54 +0000 (04:29 +0000)
commit73b75e3d0cdada5b7a9ed097ee9a912d8bd13dcc
tree7923d128168a33617d812238335e0eacb3a2a6e0
parentd9e4e98cceef2a47da2c1cc53f66af2b1e8cbbfb
COFF: Handle references from LTO object to lazy symbols correctly.

The code generator may create references to runtime library symbols such as
__chkstk which were not visible via LTOModule. Handle these cases by loading
the object file from the library, but abort if we end up having loaded any
bitcode objects.

Because loading the object file may have introduced new undefined references,
call reportRemainingUndefines again to detect and report them.

Differential Revision: http://reviews.llvm.org/D10332

llvm-svn: 239386
lld/COFF/SymbolTable.cpp
lld/test/COFF/Inputs/lto-chkstk-chkstk.s [new file with mode: 0644]
lld/test/COFF/Inputs/lto-chkstk-foo.s [new file with mode: 0644]
lld/test/COFF/lto-chkstk.ll [new file with mode: 0644]