Previously sh_entsize field was not set for MergeOutputSection.
Patch fixes that.
That should resolve the https://llvm.org/bugs/show_bug.cgi?id=26975
Differential D18248
[ELF] - Set the sh_entsize for mergable sections Authored by grimar on Mar 17 2016, 10:31 AM.
Details Previously sh_entsize field was not set for MergeOutputSection. That should resolve the https://llvm.org/bugs/show_bug.cgi?id=26975
Diff Detail Event Timeline
Comment Actions Perhaps sections with different sh_entsize should not be mergable?
Comment Actions Ah, right. I thought that we have a list of input sections, but we actually | ||||||||||||||||||
I think there is no rule what EntSize to take. Gold uses the first size he saw here:
.section .rodata.1,"aMS",@progbits,2 .asciz "a" .section .rodata.1,"aMS",@progbits,1 .asciz "b" ... EntSize == 2: [ 2] .rodata.1 PROGBITS 0000000000000000 00000040 0000000000000004 0000000000000002So I think there is no need in any conditions and we can just assign here.