Open
Description
STR:
- Download https://drive.google.com/file/d/1AESRw2pf8lbMwfKl4S238UlOBqf1YHCR/view?usp=sharing
- Unpack the archive and enter the
repro
directory. - Run
lld-link @response.txt
Expected result: success
Actual result:
lld-link: error: duplicate symbol: __declspec(dllimport) __load_timeBeginPeriod
lld-link: error: duplicate symbol: __declspec(dllimport) __load_timeEndPeriod
lld-link: error: duplicate symbol: __declspec(dllimport) __load_CoInitializeEx
lld-link: error: duplicate symbol: __declspec(dllimport) __load_GetClientRect
Removing -DELAYLOAD:ole32.dll
, -DELAYLOAD:user32.dll
, and -DELAYLOAD:winmm.dll
from the response file makes the issue go away.
What's peculiar in this link is that there are COFF import files in gkrust.lib that repeats symbols from other .lib
s. Those come from rust's raw-dylib feature. It somehow makes the linker trip with the delayload, but only on x86, not x86_64 or aarch64.
Cc: @mstorsjo