<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 - LLD segfaults when linking Linux v5.7-rc1"
   href="https://bugs.llvm.org/show_bug.cgi?id=45553">45553</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLD segfaults when linking Linux v5.7-rc1
          </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>release blocker
          </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>a.darwish@linutronix.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, smithp352@googlemail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>LLD version : v10, binaries downloaded from releases.llvm.org
Architecture: native, x86-64

When linking Linux kernel version v5.7-rc1, LLD reliably segfaults.

To reproduce the LLD segfault:

  git clone <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git">https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git</a>
  cd linux
  git checkout v5.7-rc1
  export LLVM=1
  make x86_64_defconfig
  make -j`nproc`

LLD stack dump:

0.      Program arguments: ld.lld -m elf_x86_64 -z max-page-size=0x200000
--emit-relocs --discard-none --build-id --strip-debug -o .tmp_vmlinux.kallsyms1
-T ./arch/x86/kernel/vmlinux.lds --whole-archive arch/x86/kernel/head_64.o
arch/x86/kernel/head64.o arch/x86/kernel/ebda.o
arch/x86/kernel/platform-quirks.o init/built-in.a usr/built-in.a
arch/x86/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a
fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a
block/built-in.a lib/built-in.a arch/x86/lib/built-in.a lib/lib.a
arch/x86/lib/lib.a drivers/built-in.a sound/built-in.a arch/x86/pci/built-in.a
arch/x86/power/built-in.a arch/x86/video/built-in.a net/built-in.a
virt/built-in.a --no-whole-archive --start-group --end-group
 #0 0x00000000004c7994 PrintStackTraceSignalHandler(void*)
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4c7994)
 #1 0x00000000004c585e llvm::sys::RunSignalHandlers()
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4c585e)
 #2 0x00000000004c80b5 SignalHandler(int)
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4c80b5)
 #3 0x00007f60b2dc8730 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
 #4 0x00000000004ab8cd llvm::Twine::printOneChild(llvm::raw_ostream&,
llvm::Twine::Child, llvm::Twine::NodeKind) const
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4ab8cd)
 #5 0x00000000004ab66f llvm::Twine::toStringRef(llvm::SmallVectorImpl<char>&)
const (/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4ab66f)
 #6 0x00000000004ab4f7 llvm::Twine::str[abi:cxx11]() const
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4ab4f7)
 #7 0x00000000006e463b
lld::elf::getOutputSectionName(lld::elf::InputSectionBase const*)
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x6e463b)
 #8 0x0000000000617f5d std::_Function_handler<void
(lld::elf::InputSectionBase*),
lld::elf::LinkerScript::addOrphanSections()::$_3>::_M_invoke(std::_Any_data
const&, lld::elf::InputSectionBase*&&)
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x617f5d)
 #9 0x000000000060fc2b lld::elf::LinkerScript::addOrphanSections()
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x60fc2b)
#10 0x000000000059fb7d void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(llvm::opt::InputArgList&)
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x59fb7d)
#11 0x0000000000592cf6 lld::elf::LinkerDriver::main(llvm::ArrayRef<char
const*>) (/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x592cf6)
#12 0x0000000000590957 lld::elf::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&, llvm::raw_ostream&)
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x590957)
#13 0x00000000004934f1 main
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x4934f1)
#14 0x00007f60b28bb09b __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#15 0x0000000000492caa _start
(/opt/llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/lld+0x492caa)
/home/darwi/projects/linutronix/rt/linux/scripts/link-vmlinux.sh: line 62:
24306 Segmentation fault      ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux}
${strip_debug#-Wl,} -o ${output} -T ${lds} ${objects}</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>