<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - error("misaligned ldr/str offset") on aarch64-windows build"
href="https://bugs.llvm.org/show_bug.cgi?id=39228">39228</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>error("misaligned ldr/str offset") on aarch64-windows build
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>COFF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dmajor@mozilla.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, martin@martin.st
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=20979" name="attach_20979" title="repro.zip">attachment 20979</a> <a href="attachment.cgi?id=20979&action=edit" title="repro.zip">[details]</a></span>
repro.zip
We're hitting a case where `Size` is 8 but `Imm` ends with hex digit 4 at
<a href="https://github.com/llvm-mirror/lld/blob/1b68a4c56aee3d9008dd08e8bbc49e314a12b592/COFF/Chunks.cpp#L247">https://github.com/llvm-mirror/lld/blob/1b68a4c56aee3d9008dd08e8bbc49e314a12b592/COFF/Chunks.cpp#L247</a>
This happens with cl.exe as the compiler, as we can't yet build with clang-cl
due to missing support of <a href="https://reviews.llvm.org/D51204">https://reviews.llvm.org/D51204</a>. Under link.exe these
files link without any errors. I'm assuming that means that lld-link ought to
handle it too.
Hopefully the attached zip file has enough state to reproduce this, but let me
know if I've missed something.
lld-link.exe -NOLOGO -DLL -OUT:mozglue.dll -PDB:mozglue.pdb
-SUBSYSTEM:WINDOWS,6.02 -MACHINE:ARM64 @mozglue_dll.list ./module.res
-LARGEADDRESSAWARE -DEBUG -OPT:REF,ICF -DEF:mozglue.def -guard:cf
-DELAYLOAD:user32.dll -DELAYLOAD:crypt32.dll -DELAYLOAD:wintrust.dll
kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib
secur32.lib dbghelp.lib crypt32.lib version.lib wintrust.lib delayimp.lib
lld trunk r343990</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>