[PATCH] D27415: [ELF] - Replace MergeOutputSection with synthetic input section MergeSection.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 07:54:13 PST 2016


ruiu added inline comments.


================
Comment at: ELF/LinkerScript.cpp:351
 
+      combineMergableSections(V);
+
----------------
grimar wrote:
> ruiu wrote:
> > Why do you have to do this in LinkerScript.cpp? It feels something is not right. Section aggregation should happen before the control is passed to the linker script.
> How it can be possible ?
> 
> Imagine script has:
> 
> .mergeable : { *(.aaa) *(.bbb) EXCLUDE_FILE (*file1.o) *(.ccc) }
> 
> I am able to merge them only after I have some result from createInputSectionList(), no ? Until that I don't know which sections should I combine.
I don't think you need to handle that case.


https://reviews.llvm.org/D27415





More information about the llvm-commits mailing list