<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60893>60893</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Unsupported relocation type error when assembling PUSH OFFSET instruction with llvm-mc 15.0.7 on i686-w64-windows-gnu target
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
johnplatts
</td>
</tr>
</table>
<pre>
Here is the assembly code that generates an error when assembled using llvm-mc 15.0.7 on i686-w64-windows-gnu:
```
.intel_syntax noprefix
.section .rdata,"dr"
.p2align 4
LHelloWorldMsg:
.asciz "Hello, World!\n"
.byte 0
.globl _main
.text
.p2align 4
_main:
call ___main
push offset LHelloWorldMsg
call _printf
add esp, 4
xor eax, eax
ret
```
The same code above will assemble successfully with GNU ```as```.
Here is the error message that is generated when trying to assemble the above code:
```$ llvm-mc --assemble --filetype=obj -o hello_world_clang_mingw32.o hello_world_022023.s
hello_world_022023.s:14:5: error: unsupported relocation type
push offset LHelloWorldMsg
^
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVF2PqzYQ_TXmZQQy5iPJAw_p7k33oV_Svas-RgYm4JWxkcdckv76ypBLtqut1EoROOPj4zMzh5FEqjOIFSt-YsVzJCffW1e92d6MWnpPUW3bW_WCDkER-B5BEuFQ6xs0tkXwvfTQoUEnPRJIA-icdTD3aH5AsYWJlOlA6-9DPDSQFglPdmANqHJfxnOZx7MyrZ0p7szEsiPjz4wfWcnvv-UvJMp41Ge6GS-vYOzo8KKud-z9eUgIG6-sCUvXSi-ZeGJCtI4J8QCNQmrVBVC-Bn95Qa3tn9bp9lfqNgmQSGrUX8CEWABMPMECYiJlxZPZSAEgqW8egb_XE6KdtrWG8yCV-cHp8eofgLsWuCtZkdmDARqpNZzP7ykAYJyoB3u5EHr4oP7DydEp4y-PqGxbQBpDLvkjerUOUF5DNLzWuEP_aS_W57cegeSAqxVkbb8jzErrrfFAU9Mg0WXS-gaz8j38_NsrbGSStmXynvi931Y_DUgku7vfFG2Wa1eneXcLBvP2cfXi1UVSUPeJqUS-GTKOt2NxfFEa_W1Elj3b-g1iC32o7nkO5T03WpruPCjTzZlI_rnHheAiS2i96dOd7JjmLDsWLDuumYXFZGgaR-tCOg61bWRwMCwi_le_WfHlQ5ZRW2XtITvICKu03JWHfJ_viqiv9lldYLuvd01T7jE9HJqL4LLkgpfZ7oK7SFVBMhci5RlPU5FkuJdlsxdpjvVhJwuWcxyk0kmoYmJdFymiCauS7w9ZpGWNmpa5IoTBGZbN8L0Uz5GrlsrXU0cs51qRpweLV15j9frvNflkxITm__H69QV-P52-fvkGypB30zIIVtv9t9EDXroOfTQ5XfXej6FfTJyYOHXK91OdNHZg4hTI7q94dPYNG8_EaUmQmDgtBfg7AAD__9GCqTg">