[llvm-bugs] [Bug 44715] New: After r371957 (06bb7dfbd): error: output file too large: 18446744073707016932 bytes

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jan 30 03:21:23 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44715

            Bug ID: 44715
           Summary: After r371957 (06bb7dfbd): error: output file too
                    large: 18446744073707016932 bytes
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: dimitry at andric.com
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

Created attachment 23071
  --> https://bugs.llvm.org/attachment.cgi?id=23071&action=edit
Reproduction tarball for negative size problem

Trying to build one of FreeBSD's boot loader components with lld 10.0.0, we see
the following error appear:

$ ld.lld
--sysroot=/usr/obj/share/dim/src/freebsd/clang1000-import/amd64.amd64/tmp
--eh-frame-hdr -Bstatic -m elf_i386_fbsd -o loader_lua.sym
-L/usr/obj/share/dim/src/freebsd/clang1000-import/amd64.amd64/tmp/usr/lib
-Ttext 0x0 --gc-sections --no-rosegment
/usr/obj/share/dim/src/freebsd/clang1000-import/amd64.amd64/stand/i386/btx/lib/crt0.o
main.o conf.o vers.o chain.o boot.o commands.o console.o devopen.o interp.o
interp_backslash.o interp_parse.o ls.o misc.o module.o load_elf32.o
load_elf32_obj.o reloc_elf32.o load_elf64.o load_elf64_obj.o reloc_elf64.o
disk.o part.o vdisk.o dev_net.o bcache.o isapnp.o pnp.o interp_lua.o zfs_cmd.o
/usr/obj/share/dim/src/freebsd/clang1000-import/amd64.amd64/stand/liblua32/liblua.a
/usr/obj/share/dim/src/freebsd/clang1000-import/amd64.amd64/stand/i386/libi386/libi386.a
/usr/obj/share/dim/src/freebsd/clang1000-import/amd64.amd64/stand/libsa32/libsa32.a
ld: error: output file too large: 18446744073707016908 bytes

18446744073707016908 = 0xffffffffffd952cc, so it is pretty clear that lld is
somehow creating a negative size.

Bisecting shows that this was introduced with https://reviews.llvm.org/rL371957
("[ELF] Map the ELF header at imageBase").  It seems that this change has a bad
effect when both -Ttext 0x0 and --no-rosegment are used.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200130/e00abbcc/attachment-0001.html>


More information about the llvm-bugs mailing list