<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/64548>64548</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
How do I link ELF files from lld-link.exe?
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
BenHut1
</td>
</tr>
</table>
<pre>
I'm using lld-link.exe, the Windows version of lld linker. I'm using NASM to assemble ELF object files from assembly code, and am trying to use lld-link.exe to link those into ELF executable files. Unfortunately when I use the command line "lld-link.exe test.o" (where "test.o" is the name of the ELF object file), it says "lld-link: error: test.o: unknown file type". Is the Windows version of lld-link only capable of handling COFF files? Because I need a way to compile on Windows software that will then be run on Linux. Linux is a complicated OS to use even during normal use, and using it as a development environment is even more complex. So I'm doing all my development in Windows. Even if Windows can't run Linux software, software development tools that run in Windows should certainly be able to generate Linux executables. As it is NASM for Windows already is capable of generating numerous types of object files, including both COFF an ELF. I'm now just trying to find a linker that will run in Windows that will take an ELF object file as input, and output an ELF executable file. Is this possible with lld-link.exe? There's lots of command line switches it has available. Do I just need to use one of those switches? Or do I need to abandon the Windows version of lld-link altogether?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVE1zozgQ_TXypSuULezEHDgkM0NNqmY3h-zWngU0RhOhdunDxP9-qwUkOIfdEyohve73-j0p7_XJIpbi8CQO3zcqhp5c-YT2Zwy7TU3ttXwW8mGA6LU9gTHtndH2LcN3FPIbhB7hH21bGj1c0HlNFqjjY8DH0GWwvv7n4-sfEAiU9zjUBuHHrwqo_o1NgE4b9NA5GpbfV2ioTWWUbUENENyVUQJB9HjTC-_xGkJPHkHbQAkb37GJQXGphJ_B37YjF6JVAc0Vxh4tPCc4ptLQMHAtoy2CkPK2BPqQkZAShDyOPbp05HNX-4Rh1YCsAa-_0BOyYDY6gFdXvy4g8kdA58jxYobMHyHaN0ujTZchXM8opMz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