<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 --- - [idea] Some sort of "layering analysis" / "layering check" feature."
   href="https://llvm.org/bugs/show_bug.cgi?id=26959">26959</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[idea] Some sort of "layering analysis" / "layering check" feature.
          </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>All Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chisophugis@gmail.com
          </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>The linker is in a unique position to analyze the layering of the input
program.

I'm not sure what form this would take. Maybe some form of visualization. Maybe
a diagnostic about recursive dependencies between object files. Maybe a
diagnostic about recursive dependencies between archives.
Note that STT_FILE gives us a way to give useful information at the source file
level (and if we want to go crazy then debug info can give more precision).

One interesting thing is this sort of "matrix" visualization of the
dependencies: <a href="http://www.c2lang.org/docs/lld_architecture_20150126.png">http://www.c2lang.org/docs/lld_architecture_20150126.png</a>
(from thread "[LLVMdev] [lld] LLD's software architecture (jan 2015)")
This is a layering diagram for (atom) LLD itself, but the idea would be to
provide users with this information about *their* program (but LLD can dogfood
this, of course).

This is just an idea. I'm not sure if this is feasible to implement, but I
think it would be a nice feature.
Once we can visualize this in a useful way, we can start looking at real
projects to figure out what would is a realistic useful "check" that users may
want and would not be too noisy.</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>