<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 - LLD is missing support for ARMv6M thunks"
   href="https://bugs.llvm.org/show_bug.cgi?id=39922">39922</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLD is missing support for ARMv6M thunks
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>ELF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>eblot.ml@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>ARMv6M does not support movw/movt Thumb2 instructions.

Current LLD version v7.0 emits such instructions to generate long jump in
thunks. For example, this code generation occurs when code is relocated from
flash to RAM on embedded Cortex-M0/M0+ cores.

This prevents using LLD with Cortex-M0/M0+ cores when such a feature is used.

I've written a small patch to support this feature, but I'm not a LLD developer
and I do not know how to write valid tests for the LLVM infrastructure, so I
guess this would require more work effort to propose a valid patch:

<a href="https://gist.github.com/eblot/43552f8c01cc7d2ee4faef42454c2c83">https://gist.github.com/eblot/43552f8c01cc7d2ee4faef42454c2c83</a>

It only support absolute addressing, not position-independent code - I'm not
sure this is a useful feature on M0+ core anyway and I would not have any real
world examples to test it.</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>