[PATCH] D37574: [ELF] - Do not merge sections from SHT_GROUP when -relocatable
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 03:18:23 PDT 2017
grimar added inline comments.
================
Comment at: ELF/OutputSections.cpp:215
// creates broken section contents.
- if (IS->Type == SHT_GROUP) {
+ // We also do not merge any SHF_GROUP sections because otherwise we
+ // end up with multiple SHT_GROUPs containing the same output section.
----------------
ruiu wrote:
> This comment is not correct. Assume that there's only one section group containing a section .foo, and there's other object file having a section .foo which is not a member of any section group. It'll end up with only one section group, but we still shouldn't merge the member .foo with non-member .foo, because it is semantically incorrect.
Right. Updated comment and added regular (non-group) section to testcase.
https://reviews.llvm.org/D37574
More information about the llvm-commits
mailing list