[PATCH] D39045: [ELF] - Simplify output section creation.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 18 04:27:35 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

Our code that creates output sections is very similar to code
that handles orphans. Earlier we did integration of LLD scripted/non-scripted logic
so that even fabricate script commands with `fabricateDefaultCommands`
when no layout specified in script. And I think when there are no SECTION
commands given, all sections are technically orphans, but now we handle script orphans
sections and regular "orphan" sections for non-scripted case differently,
though we can handle them at one place now.

That IMO makes code cleaner and simpler. Patch shows the change I am suggesting.


https://reviews.llvm.org/D39045

Files:
  ELF/LinkerScript.cpp
  ELF/OutputSections.cpp
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39045.119457.patch
Type: text/x-patch
Size: 5539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171018/f218f55e/attachment.bin>


More information about the llvm-commits mailing list