[PATCH] D28313: Change which input sections we concatenate

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 10:45:05 PST 2017


Ed Maste <emaste at freebsd.org> writes:

> 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.)

Interesting. I assume the intention is to allocate disk space for .bss?

Cheers,
Rafael


More information about the llvm-commits mailing list