<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 - ELF LLD fails to handle multiple files in archives with the same name with ThinLTO"
   href="https://bugs.llvm.org/show_bug.cgi?id=32931">32931</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ELF LLD fails to handle multiple files in archives with the same name with ThinLTO
          </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>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>peter@pcc.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat 1/foo.c
void f1() {}
$ cat 2/foo.c
void f2() {}
$ clang -flto=thin -c -o 1/foo.o 1/foo.c 
$ clang -flto=thin -c -o 2/foo.o 2/foo.c 
$ ar cru lib1.a 1/foo.o  # (where "ar" does not understand LLVM bitcode)
$ ar cru lib2.a 2/foo.o
$ clang -fuse-ld=lld -Wl,-uf1,-uf2 lib1.a lib2.a
ld.lld: error: Expected at most one ThinLTO module per bitcode file
clang-4.0: error: linker command failed with exit code 1 (use -v to see
invocation)

I think the fix is to make sure that the archive name and file offset is part
of the path that LLD passes through to the LTO API as we do for archive members
with symbol tables.</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>