<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 - Crash with -emit-relocs and linker scripts"
href="https://bugs.llvm.org/show_bug.cgi?id=33029">33029</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash with -emit-relocs and linker scripts
</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>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rafael.espindola@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Given an empty assembly file for armv7a-none-linux-gnueabi and the linker
script
SECTIONS
{
.rel.dyn : { }
.zed : {
PROVIDE_HIDDEN (foobar = .); }
}
the command "ld.lld a1.o -emit-relocs -T l.script" crashes and the backtrace
is
#0 0x000000000060be1c in
lld::elf::OutputSection::finalize<llvm::object::ELFType<(llvm::support::endianness)1,
false> > (this=0x6050218)
at /home/espindola/llvm/llvm/tools/lld/ELF/OutputSections.cpp:132
#1 0x00000000006e6753 in (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, false>
<span class="quote">>::finalizeSections (this=0x7fffffffd260)</span >
at /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:1251
#2 0x00000000006e3022 in (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, false>
<span class="quote">>::run (this=0x7fffffffd260)</span >
at /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:243
#3 0x00000000007043e2 in
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1,
false> > () at /home/espindola/llvm/llvm/tools/lld/ELF/Writer.cpp:133
#4 0x000000000056006f in
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
false> > (this=0x60283a0, Args=...)
at /home/espindola/llvm/llvm/tools/lld/ELF/Driver.cpp:1014
#5 0x0000000000555f73 in lld::elf::LinkerDriver::main (this=0x60283a0,
ArgsArr=..., CanExitEarly=true) at
/home/espindola/llvm/llvm/tools/lld/ELF/Driver.cpp:388
#6 0x0000000000552d64 in lld::elf::link (Args=..., CanExitEarly=true,
Error=...) at /home/espindola/llvm/llvm/tools/lld/ELF/Driver.cpp:85
#7 0x00000000004126cf in main (Argc=8, Argv=0x7fffffffdff8) at
/home/espindola/llvm/llvm/tools/lld/tools/lld/lld.cpp:104</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>