<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 - Should synthetic sections be InputSections or OutputSections?"
   href="https://bugs.llvm.org/show_bug.cgi?id=49780">49780</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Should synthetic sections be InputSections or OutputSections?
          </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>All
          </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>MachO
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>smeenai@fb.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>gkm@fb.com, jezreel@gmail.com, llvm-bugs@lists.llvm.org, smeenai@fb.com, smithp352@googlemail.com, vyng@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We decided to make SyntheticSections be OutputSections back in
<a href="https://reviews.llvm.org/D77893#inline-716459">https://reviews.llvm.org/D77893#inline-716459</a>. We were debating why ELF makes
them InputSections; it appears the main motivation for that design was to allow
synthetic sections to be manipulated via linker scripts, which we don't need to
support with Mach-O.

Peter Smith gave a talk on LLD's performace
(<a href="https://archive.fosdem.org/2019/schedule/event/llvm_lld/">https://archive.fosdem.org/2019/schedule/event/llvm_lld/</a>), in which he
mentioned that LLD's synthetic sections being input sections (as opposed to
output sections) significantly sped up thunks (at the 25:10 mark). Our thunk
design will likely be closer to COFF's than ELF's, so I'd be curios if this has
an effect for us.

We discussed this further in <a href="https://reviews.llvm.org/D87199#2264781">https://reviews.llvm.org/D87199#2264781</a>, where we
decided to defer any potential refactoring until we were more feature-complete.
I don't think we're still at the point where we'd consider this refactoring
yet, but it's worth keeping in mind for the future.</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>