[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


            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
--eh-frame-hdr -Bstatic -m elf_i386_fbsd -o loader_lua.sym
-Ttext 0x0 --gc-sections --no-rosegment
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
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