[PATCH] D39489: [ELF] - Linkerscript: fix issue with multiple output sections definitions.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 01:24:03 PST 2017


grimar added a comment.

In https://reviews.llvm.org/D39489#927124, @ruiu wrote:

> If this is hypothetical, I wouldn't work this hard to "fix" it.


Its not only fixes the issue. Our current logic of 'createOutputSection' honestly looks very odd for me.
It can depending on conditions:

1. Create and return new output section and remember it in NameToOutputSection.
2. Create and return new output section and don't remember it.
3. Just declare and return previously defined output section.

And It works with name to ouput sections as 1:1 though we know its 1:many semantically.

I believe new logic and naming introduced in this patch is much more clear.
That is what I tried to improve as well here.


https://reviews.llvm.org/D39489





More information about the llvm-commits mailing list