[PATCH] D33646: [ELF] - Do not crash when linkerscript applies fill to .bss.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Mon May 29 22:45:46 PDT 2017
>> grimar created this revision.
>> Herald added a subscriber: emaste.
>>
>> I found that during visual inspection of code while wrote different patch.
>> Script in testcase probably have nothing common with real life, but
>> we segfault currently using it.
>>
>> I think if output section is known NOBITS, there is no need to create
>> writers threads for doing nothing or proccess any filler logic that is useless here.
>> We can just early return, that is what this patch do.
>
>Should we error?
>
>What do gold and bfd do? LGTM if they also just ignore this.
>
>Cheers,
>Rafael
Both bfd and gold ignore this.
Though I would just expect nobody tries to apply =fill to .bss probably. It can be easy to add
error/warning after this if we will want to catch that:
uint32_t Filler = getFiller();
if (Sec->Type == SHT_NOBITS) {
if (Filler)
error(".....");
return;
}
George.
More information about the llvm-commits
mailing list