[PATCH] D27041: [ELF] - Disable emiting multiple output sections when merging is disabled.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 09:36:51 PST 2016


ruiu added inline comments.


================
Comment at: ELF/LinkerScript.cpp:280
 
+  // We do not do merge of sections in case when optimization is disabled,
+  // drop the flags in that case to stop produce multiple output sections.
----------------
I don't think this is the right place to fix it.

If shouldMerge() returns false, we should override Flags so that it doesn't have SHF_MERGE|SHF_STRINGS.

Then naturally they'll be linked as if they were not mergeable.


https://reviews.llvm.org/D27041





More information about the llvm-commits mailing list