<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 - wasm64: unimplemented R_WASM_GLOBAL_INDEX_I64 using -generate-arange-section"
   href="https://bugs.llvm.org/show_bug.cgi?id=52376">52376</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>wasm64: unimplemented R_WASM_GLOBAL_INDEX_I64 using -generate-arange-section
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Backend: WebAssembly
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>alex@crichton.co
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aardappel@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25413" name="attach_25413" title="reduced bytecode">attachment 25413</a> <a href="attachment.cgi?id=25413&action=edit" title="reduced bytecode">[details]</a></span>
reduced bytecode

In compiling some Rust code this is a crash that I've been seeing when enabling
debug information. It looks like the Rust compiler by default will pass the
`-generate-aragne-section` argument to LLVM which causes this crash, and
avoiding passing that flag will work. I've attached the bugpoint-reduced
bitcode here to this issue and can reproduce the crash with:


$ llc -filetype=obj -o foo.o -generate-arange-section
./bugpoint-reduced-simplified.bc
unimplemented R_WASM_GLOBAL_INDEX_I64
UNREACHABLE executed at
/home/acrichto/code/rust/src/llvm-project/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp:146!
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
...


I'll be updating the Rust compiler to avoid passing -generate-arange-section
now on the wasm64 target (temporarily), but figured it'd be good to open a bug
still!</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>