Does ld.lld linker work correctly on windows?

488 Views Asked by At

At first ld.lld seems to link successfully, but the executable crashes when executing a call instruction.

I'm using clang 6.0.1

My program links and executes just fine using the gcc ld.

Someone told me the driver is incomplete, is this true?

Has anyone linked and ran on windows using ld.lld successfully?

-> 4    extern "C" void Entry()
-> 5    {
-> 6      ExitProcess(0);

Game.exe`::Entry():
->  0x140003000 <+0>:  sub    rsp, 0x28
    0x140003004 <+4>:  mov    rax, qword ptr [rip - 0x1fe7] ; __imp_ExitProcess
    0x14000300b <+11>: xor    ecx, ecx
    0x14000300d <+13>: call   rax
    0x14000300f <+15>: ud2

    (lldb) s
    Process 7508 crashed
    * thread #1, stop reason = Exception 0xc0000005 encountered at address 0x001034
    frame #0: 0x0000000000001034
0

There are 0 best solutions below