Commit Graph

2 Commits

Author SHA1 Message Date
Alexander Shaposhnikov f59ab35b1b [lld] Fix comdat tests
This diff adjusts the comdat tests after changing the format
of llvm-readobj output for .group sections.

llvm-svn: 327353
2018-03-13 00:07:53 +00:00
George Rimar 072a43b501 [ELF] - Do not merge sections from SHT_GROUP when -relocatable
This is PR34506.

Imagine we have 2 sections the same name but different COMDAT groups:

.section        .foo,"axG",@progbits,bar,comdat
.section        .foo,"axG",@progbits,zed,comdat
When linking relocatable we do not merge SHT_GROUP sections. But still would merge
both input sections .foo into single output section .foo.
As a result we will have 2 different SHT_GROUPs containing the same section, what
is wrong.

Patch fixes the issue, preventing merging SHF_GROUP sections with any others.

Differential revision: https://reviews.llvm.org/D37574

llvm-svn: 313621
2017-09-19 09:40:31 +00:00