<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: error: thunk creation not converged linking failure"
   href="https://bugs.llvm.org/show_bug.cgi?id=38078">38078</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld: error: thunk creation not converged linking failure
          </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>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tomasz.sniatowski+llvm@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While building a fork of Chromium 67 (targeting android-arm), I encountered a
cryptic "thunk creation not converged" error from lld after applying some
innocent-looking patch on top of a working build. All of a sudden, aftera 10
line C++ patch doing nothing extra-ordinary, the build would refuse to link,
with 100% reproducibility, and on different machines. I did not find any bugs
or mentions of hitting that error message anywhere.

After some digging, I found that lld versions between 

<a href="https://github.com/llvm-project/llvm-project-20170507/commit/dbac5a102bf58bf9fb55b62110e1298146555b06">https://github.com/llvm-project/llvm-project-20170507/commit/dbac5a102bf58bf9fb55b62110e1298146555b06</a>
ELF: Do not create multiple thunks for the same virtual address.

and 

<a href="https://github.com/llvm-project/llvm-project-20170507/commit/12f238bb4b2b9384772055b7c1d62b5ec27db2c0">https://github.com/llvm-project/llvm-project-20170507/commit/12f238bb4b2b9384772055b7c1d62b5ec27db2c0</a>
ELF: Add support for short thunks on ARM.

exhibit the issue. Linking with gold was fine, using a newer or older lld (not
in that range) was also fine.

Obviously this is not an "active" issue (lld master also works), however given
my limited understanding of what actually goes wrong, I worry a bit that the
"fix" commit my bisect found was actually only an optimization that hid the
issue, but did not solve it. I would really appreciate if someone familiar with
this code could take a look.

Unfortunately I am unable to provide a repro case as it is a) very large in
terms of object files linked b) huge in terms of source diff on top of plain
chrome and worst of all c) partially proprietary, so I legally can't. However,
I can try to run tests, instrumented builds, provide logs, etc., to try and
help pinpoint what goes wrong.</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>