<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 makes enormous zero filled MIPS binary"
   href="https://bugs.llvm.org/show_bug.cgi?id=33131">33131</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>lld makes enormous zero filled MIPS binary
          </td>
        </tr>

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

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

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>NetBSD
          </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>coypu@sdf.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>using clang 4.0.0 and lld 4.0.0 on NetBSD-7.99.71/amd64.

using very simple code:
  int main() { return 0; }

if I change /usr/bin/ld to be lld and running the command:
  $ clang --target=mipsel--netbsd7.99 -mips32r2 -integrated-as -nostdlib -o
test test.c
  /usr/bin/ld: warning: cannot find entry symbol __start; defaulting to 0x20000

if /usr/bin/ld is lld, I get a 129K test file.
xxd shows it is mostly zero filled until 0x20000

I made /usr/bin/ld a sufficiently compatible mips binutils linker, and using
the same command it makes a 1.4K binary (but picks a different entry point)</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>