<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 - ThinLTO, relocation refers to discard section"
   href="https://bugs.llvm.org/show_bug.cgi?id=32980">32980</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ThinLTO, relocation refers to discard section
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>A ThinLTO build of a quite large application is generating a warning from the
linker
   ./boost/exception/detail/exception_ptr.hpp:143: warning: relocation refers
to discarded section
and the binary faults during static construction by trying access location 0.
   => 0x0000000006f31fd1
<_GLOBAL__sub_I__ZN5boost6detail16thread_data_baseD2Ev()+33>:     cmpb  
$0x0,-0x6f31fd8(%rip)        # 0x0

I have verified this problem exists in the current trunk as well.

I would love to work on reducing the problem but am uncertain how to get going.
How do I determine which section is being discarded and why?
Assuming this is a duplicate COMDAT, is the relocation supposed to be fixed? If
so where?

There are a lot of these warnings. The most unusual aspect of the build is the
presence of “—whole-archive” link commands although I don’t how that would
present a problem to ThinLTO.</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>