<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 - LTO seems to be optimizing away calls to compiler generated symbols"
   href="https://bugs.llvm.org/show_bug.cgi?id=34169">34169</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LTO seems to be optimizing away calls to compiler generated symbols
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </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>release blocker
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>lto
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>phosek@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We're seeing this issue when building our kernel and low-level libraries (below
libc) with LTO. This appears to be a recent regression, we don't see these
issues with our Clang build from April.

<a href="https://storage.googleapis.com/fuchsia-build/lld/libuserboot.cpio">https://storage.googleapis.com/fuchsia-build/lld/libuserboot.cpio</a>

/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/bin/ld.lld: error:
undefined symbol: memmove
<span class="quote">>>> referenced by ld-temp.o
>>>               lto.tmp:(bootstrap)</span >

/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/bin/ld.lld: error:
undefined symbol: memcpy
<span class="quote">>>> referenced by ld-temp.o
>>>               lto.tmp:(bootstrap)</span >

<a href="https://storage.googleapis.com/fuchsia-build/lld/libmagenta.cpio">https://storage.googleapis.com/fuchsia-build/lld/libmagenta.cpio</a>

/usr/local/google/home/phosek/clang-llvm/llvm/out/lld/bin/ld.lld: error:
undefined symbol: __stack_chk_fail                                             
                                                                               
                                                                               
                                                                               
                                >>> referenced by acpi.cpp:54
(kernel/platform/pc/acpi.cpp:54)                                               
                                                                               
                                                                               
                                                                               
                                                                           >>> 
             lto.tmp:(platform_init_acpi_tables)</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>