<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - linker script command line option handling"
   href="https://llvm.org/bugs/show_bug.cgi?id=30814">30814</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>linker script command line option handling
          </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>brad@comstyle.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>While testing out linking the OpenBSD/amd64 boot blocks/loader with lld I
noticed what looks like an issue with the command line option handling for
linker scripts..

ld.lld -nostdlib -Ttext 0 -x -s -Bstatic -e start -nopie -melf_i386
-L/usr/libdata -o mbr mbr.o
ld.lld: error: cannot open text: No such file or directory
ld.lld: error: cannot open 0: No such file or directory

ld.lld -nostdlib -Ttext 0x0000 -x -s -Bstatic -e start -nopie -melf_i386
-L/usr/libdata -o cdbr cdbr.o
ld.lld: error: cannot open text: No such file or directory
ld.lld: error: cannot open 0x0000: No such file or directory

ld.lld  -nostdlib -Bstatic -Ttext 0x40120 -x -nopie -melf_i386 -L/usr/libdata
-o boot.new srt0.o conf.o boot.o bootarg.o cmd.o vars.o gidt.o random_i386.o
cmd_i386.o dev_i386.o exec_i386.o gateA20.o machdep.o bioscons.o biosdev.o
diskprobe.o memprobe.o time.o softraid.o alloc.o ctime.o exit.o getchar.o
memcmp.o memcpy.o memset.o printf.o putchar.o snprintf.o strcmp.o strerror.o
strlen.o strncmp.o strncpy.o strtol.o strtoll.o close.o closeall.o cons.o
cread.o dev.o disklabel.o dkcksum.o fstat.o lseek.o open.o read.o readdir.o
stat.o elf32.o elf64.o loadfile.o ufs.o aes_xts.o explicit_bzero.o hmac_sha1.o
pbkdf2.o rijndael.o sha1.o divdi3.o moddi3.o qdivrem.o strlcpy.o adler32.o
crc32.o inflate.o inftrees.o
ld.lld: error: cannot open text: No such file or directory
ld.lld: error: cannot open 0x40120: No such file or directory</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>