<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 crashes if we synthesize output sections using BYTE commands with -r"
   href="https://bugs.llvm.org/show_bug.cgi?id=33596">33596</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld crashes if we synthesize output sections using BYTE commands with -r
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </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>ELF
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ruiu@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>lld crashes if the -r option is given and the following linker script is given.

$ llvm-mc -filetype=obj -triple=x86_64-unknown-linux -o x.o < /dev/null
$ echo 'SECTIONS { .foo : { BYTE(0x11) } }' > x.script
$ /ssd/b/bin/ld.lld -o /dev/null -r x.o x.script
#0 0x0000000001f62fd9 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/ssd/llvm-project/llvm/lib/Support/Unix/Signals.inc:398:11
#1 0x0000000001f63189 PrintStackTraceSignalHandler(void*)
/ssd/llvm-project/llvm/lib/Support/Unix/Signals.inc:462:1
#2 0x0000000001f617f3 llvm::sys::RunSignalHandlers()
/ssd/llvm-project/llvm/lib/Support/Signals.cpp:0:5
#3 0x0000000001f634e4 SignalHandler(int)
/ssd/llvm-project/llvm/lib/Support/Unix/Signals.inc:252:1
#4 0x00007f6719a50330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00000000022147b1 (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>::finalizeSections() /ssd/llvm-project/lld/ELF/Writer.cpp:1247:23</span >
#6 0x00000000021f82cf (anonymous
namespace)::Writer<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>::run() /ssd/llvm-project/lld/ELF/Writer.cpp:207:3</span >
#7 0x0000000002228ad2 void
lld::elf::writeResult<llvm::object::ELFType<(llvm::support::endianness)1, true>
<span class="quote">>() /ssd/llvm-project/lld/ELF/Writer.cpp:126:64</span >
#8 0x000000000203b047 void
lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1,
true> >(llvm::opt::InputArgList&) /ssd/llvm-project/lld/ELF/Driver.cpp:1057:1
#9 0x000000000202a979 lld::elf::LinkerDriver::main(llvm::ArrayRef<char const*>,
bool) /ssd/llvm-project/lld/ELF/Driver.cpp:386:5
#10 0x000000000202a17d lld::elf::link(llvm::ArrayRef<char const*>, bool,
llvm::raw_ostream&) /ssd/llvm-project/lld/ELF/Driver.cpp:86:3
#11 0x0000000001ea327e main /ssd/llvm-project/lld/tools/lld/lld.cpp:104:12
#12 0x00007f671862bf45 __libc_start_main
/build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0
#13 0x0000000001ea3029 _start (/ssd/b/bin/ld.lld+0x1ea3029)
Stack dump:
0.      Program arguments: /ssd/b/bin/ld.lld -o /dev/null -r x.o x.script
/tmp/foo.sh: line 3: 20852 Segmentation fault      (core dumped) ld.lld -o
/dev/null -r x.o x.script</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>