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

    <tr>
        <th>Summary</th>
        <td>
            lld COFF X64: out of range relocations are truncated without reporting errors
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

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

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

<pre>
    In the following related issue (https://github.com/llvm/llvm-project/issues/106319), some object code has been generated with `code-model=small relocation-model=static` and uses 32-bit absolute relocations. As the base address is `1 << 32`,  `ldd` produces wrong relocated addresses.  

When looking at the code, it seems we narrow/truncate then compute instead of doing the way round.
For comparison, ELF uses `checkUInt/checkInt/checkIntUInt` after 64-bit address computations.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk89u2zAMxp9GvhAN9MdxmoMPWToDBQbsNKzbTZaYWKsiBqLcoG8_yG7R9byLLZjkR_Knz5Y5nBNiL7ZfxPahsXOZKPcvUvmnX7-bkfxr_5igTAgnipFuIZ0hY7QFPQTmGUHo-6mUKwtzEHoQejiHMs3jxtFF6CHGl_fX3TXTH3RF6GGpZKEHJTuj9kLvhT4C0wWBxpoDjjzCZBlGxARnTJiXnrdQJhCdrPG7C3mMwjzwxcZYxyJnS6D0ESi2BCc6CTZ5mBkZjL4bQwE7MsW54D9VvIEDL6uOlhGs9xmZIXDtp0CYozBHMFp0sk5bv0bvq_g1k58dMtwyrXyqJPp3DeQNgJAPQh7W588JE0Si54rTlqVp3ajqhgKMeGG4ISSbM92EHkqeU5WsmQkcXa519pC4oPVAJ_BUparOzb5Cpjn5zdproLwU2ByYUu3w9duwsqgcJ3TPPx5TvZXl_Pm4RCq-U8EMXbuyeyOzjvHGrvG98Xuztw32aqe35l5tpWqmXmqljG1H6-3oXYdOG9yZrUPTaqWcbkKvpW7lXhrVmXutNt5tx1Mrd3J7cnI_omglXmyIm-qiDeVzs_inV3KndNtEO2LkxcFax-iF1tXKuV9MN85nFq2MgQt_CJRQIvYxejh-HwZ46lphDkBzqSyzTedPxgCbEd6vYPVgTc14pVwqd8yZMjdzjv3__AvLOi-9_hsAAP__T6Ivew">