<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/91708>91708</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Why can static linking with AOT ld successfully link the object files generated by ORC JIT, but JITlink fails to produce a correct executable file?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Thrrreeee
      </td>
    </tr>
</table>

<pre>
    When I input a .bc file generated by a multithreaded program, `dump` the object file generated by ORC JIT, ORC JIT cannot produce a correct executable file, and using llvm-jitlink also fails. However, when I use clang `ld` to link, it succeeds.
When debugging with LLDB, it outputs the error ` signal SIGSEGV: invalid address (fault address: 0x0).`
What could be the reasons behind this situation?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEUs1u2zwQfBrqsohAUf6RDjrk53O-FAECNEFzXopriSlNGuQyjt--oJK0QNGiJxPWzOzuzGBKdvJEg1hfifVNhZnnEIenOcZIRFTpYM7D80we7sD6Y2ZAqPUIe-sIJvIUkcmAPgPCITu2PEdCQwaOMUwRD0Jdg9hIkw9HsZHAM0HQLzTyHyQevl7Dl7unQvl4wojeBy5iJo8ECGOIsbDpjcbMqB0tQoWD3kBO1k_g3Ovh4sWys_47oEsB9mhdquH_cKJXigV9ej8qJ4LRoZ_Kls4sOwYoxAKyDCmPI5FJtZA3Ql4uXhjSeZrKpJPlGe7vb64-0CHzMXNa7qQYQyyyUExGB493t4__3X4T7SVY_4rOGkBjIqUEQnV7zI4__ygY-SaF6muxkZ-jkWEM2RnQtEyIhCn4BJpm6w3wbBMkyxnZBi_aXWWG1vRtjxUNzbZZt2rTbdtqHpreNH3XbXXX90biKBut1RpN09JGSS0rOyipVnLdSLldNU1b03rTtd1-3axGbIi0WEk6oHV18boOcapsSpmGvtnKrnKoyaWlVUp5OsHyUShVShaHJR-dpyRW0tnE6ZcKW3Y0PM_nEj0kRrbjEsdPty8fnsCZ91xS2mfnzgvg926lv5ZLZy7PhbQUo0T-74q1uypHN8zMx5KPUDuhdpPlOet6DAehduWKj5-LYwxlFaF2y-1JqN3izY8AAAD__8Q9Jc8">