[PATCH] D28313: Change which input sections we concatenate

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 10:11:55 PST 2017


On 12 January 2017 at 12:40, Ed Maste <emaste at freebsd.org> wrote:
>
> This is what prompted 31619, yes. I assumed it would be due to some
> oddity in the EFI loader build and that FreeBSD would need a fix. When
> I added the -error-limit=0 to figure out what was happening I
> encountered the assertion failure and submitted the PR.

The crash was fixed by r291765, but the original problem remains.

It looks like the problem comes from the linker script, where we have:

  .data         : {
    *(.rodata .rodata.* .gnu.linkonce.r.*)
    ...
    *(.bss .bss.* .gnu.linkonce.b.*)
    *(COMMON)
  }

i.e., we want to put .bss and common symbols into .data. The
SHT_NOBITS of .bss/COMMON indeed disagrees with .data's SHT_PROGBITS.

(We build the EFI loader as an ELF binary and use objcopy to convert
to PE format, and I guess .bss didn't work with that process.)


More information about the llvm-commits mailing list