2

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
SedatedSnail
  • 113
  • 7
  • can you post the complete stack, error message and if possible the call instruction with tools' version? – Chirag Patel Sep 16 '18 at 08:06
  • @ChiragPatel I have added the lldb output. The complete stack, error message, and call instruction, can all be seen from this snippet. I have also added the version number. – SedatedSnail Sep 16 '18 at 09:03

0 Answers0