[PATCH] D23924: [ELF] - Linkerscript: allow add MergeInputSection to regular OutputSection.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 01:30:35 PDT 2016

>I was able to write a script that shows that symbols in merge sections
>are already pretty broken:
>.abc : { zed0 = .; *(.foo); zed1 = .; *(.bar);  zed2 = .; *(.zed); zed3 = .; }
>running it on
>        .section        .foo,"aMS", at progbits,1
>        .asciz  "abc123"
>        .section        .bar,"aMS", at progbits,1
>        .asciz  "aabc123"
>        .section        .zed,"aMS", at progbits,1
>        .asciz  "x"
>causes the symbols to point to pretty much arbitrary places when the
>strings are merged. Given that, I am pretty sure we  can produce
>multiple output sections and just error if there is a symbol
>definition in a SHF_MERGE output section.

Nice. I can prepare a patch restoring logic of multiple output sections creation then.


More information about the llvm-commits mailing list