<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 does not find libraries referenced by linker scripts; bfd does; rpath-link differs from -L path"
   href="https://llvm.org/bugs/show_bug.cgi?id=30360">30360</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld does not find libraries referenced by linker scripts; bfd does; rpath-link differs from -L path
          </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>FreeBSD
          </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>ELF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>eric@vangyzen.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17250" name="attach_17250" title="script to reproduce">attachment 17250</a> <a href="attachment.cgi?id=17250&action=edit" title="script to reproduce">[details]</a></span>
script to reproduce

I'm using clang and lld built from tags/RELEASE_390/final on FreeBSD 10.3
amd64.

When I run the attached script, I get the following output:

=== bfd
=== lld
line 1: unable to find libz.so.6
GROUP ( libz.so.6 )
        ^
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)</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>