<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 - Allow linking against shared objects without section headers"
   href="https://bugs.llvm.org/show_bug.cgi?id=41058">41058</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Allow linking against shared objects without section headers
          </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>jakehehrlich@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>On fuchsia we use --strip-sections on everything but currently have a hack
where we use --strip-all on shared libraries and then --strip-sections before
we put things on the device. We do this because it is assumed that a .dynsym
section will be around.

It is possible to use PT_DYNAMIC and the hash table to find all dynamic symbols
in a library and get the same bytes as those found in .dynsym without needing
the actual section headers however. See
<a href="https://github.com/llvm/llvm-project/blob/master/llvm/tools/llvm-elfabi/ELFObjHandler.cpp#L154">https://github.com/llvm/llvm-project/blob/master/llvm/tools/llvm-elfabi/ELFObjHandler.cpp#L154</a>
for code that does this that we can copy into LLD. Roland McGrath and Armando
worked that out and I reviewed it. Armando showed that it gave the correct size
for .dynsym on every Fuchsia binary as well so it not only should it
theoretically work but it has been shown to work well on a large project in
practice.</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>