Skip to content
Unverified Commit 6a323e7e authored by Martin Storsjö's avatar Martin Storsjö Committed by GitHub
Browse files

[LLD] [COFF] Add tests to observe details about LTO and __imp_ prefixes. NFC. (#72764)

The commit 3ab6209a had the undesired
effect of retaining every `__imp_` symbol, even if it isn't referenced
in any way. Add a testcase to observe this behaviour, to serve as
a reference point if this behaviour were to be improved later.

Port the testcase from b963c0b6 from
the llvm/LTO testsuite into LLD as a preparation for changing that fix;
the moved testcase has a comment for one case which doesn't work
currently.

The testcase is ported mostly as is, but with symbol mangling
simplified, rewriting function names from MSVC C++ mangling to plain
C, and unnecessary debug info is removed.

Add a case of a dllimported data symbol, in addition to the existing
call of a dllimported function.

Also extend the testcase to test combinations of both regular
object files and LTO objects. Leave out one combination which currently
fails, with a comment.
parent 6d23aaad
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment