summaryrefslogtreecommitdiffstats
path: root/lld/ELF/OutputSections.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] Allow SHF_LINK_ORDER and non-SHF_LINK_ORDER to be mixedFangrui Song2020-04-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, `error: incompatible section flags for .rodata` is reported when we mix SHF_LINK_ORDER and non-SHF_LINK_ORDER sections in an output section. This is overconstrained. This patch allows mixed flags with the requirement that SHF_LINK_ORDER sections must be contiguous. Mixing flags is used by Linux aarch64 (https://github.com/ClangBuiltLinux/linux/issues/953) .init.data : { ... KEEP(*(__patchable_function_entries)) ... } When the integrated assembler is enabled, clang's -fpatchable-function-entry=N[,M] implementation sets the SHF_LINK_ORDER flag (D72215) to fix a number of garbage collection issues. Strictly speaking, the ELF specification does not require contiguous SHF_LINK_ORDER sections but for many current uses of SHF_LINK_ORDER like .ARM.exidx/__patchable_function_entries there has been a requirement for the sections to be contiguous on top of the requirements of the ELF specification. This patch also imposes one restriction: SHF_LINK_ORDER sections cannot be separated by a symbol assignment or a BYTE command. Not allowing BYTE is a natural extension that a non-SHF_LINK_ORDER cannot be a separator. Symbol assignments can delimiter the contents of SHF_LINK_ORDER sections. Allowing SHF_LINK_ORDER sections across symbol assignments (especially __start_/__stop_) can make things hard to explain. The restriction should not be a problem for practical use cases. Reviewed By: psmith Differential Revision: https://reviews.llvm.org/D77007 (cherry picked from commit 673e81eee4fa3ffa38736f1063e6c4fa2d9278b0)
* [lld] Fix trivial typos in commentsKazuaki Ishizaki2020-01-061-1/+1
| | | | | | Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D72196
* [LLD][ELF] - Make compression level be dependent on -On.Georgii Rymar2019-11-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently LLD always use zlib compression level 6. This patch changes it to use 1 for -O0, -O1 and 6 for -O2. It fixes https://bugs.llvm.org/show_bug.cgi?id=44089. There was also a thread in llvm-dev on this topic: https://lists.llvm.org/pipermail/llvm-dev/2018-August/125020.html Here is a table with results of building clang mentioned there: ``` Level Time Size 0 0m17.128s 2045081496 Z_NO_COMPRESSION 1 0m31.471s 922618584 Z_BEST_SPEED 2 0m32.659s 903642376 3 0m36.749s 890805856 4 0m41.532s 876697184 5 0m48.383s 862778576 6 1m3.176s 855251640 Z_DEFAULT_COMPRESSION 7 1m15.335s 853755920 8 2m0.561s 852497560 9 2m33.972s 852397408 Z_BEST_COMPRESSION ``` It shows that it is probably not reasonable to use values greater than 6. Differential revision: https://reviews.llvm.org/D70658
* Fix a few typos in lld/ELF to cycle botsNico Weber2019-10-281-1/+1
|
* Crt files are special cased by name when dealing with ctor and dtorSterling Augustine2019-10-251-10/+16
| | | | | | | | | | | | | | sections, but the current code misses certain variants. In particular, those named when clang takes the code path in clang/lib/Driver/ToolChain.cpp:416, where crtfiles are named: clang_rt.<component>-<arch>-<env>.<suffix> Previously, the code only handled: clang_rt.<component>.<suffix> <component>.<suffix> This revision fixes that.
* [ELF] Wrap things in `namespace lld { namespace elf {`, NFCFangrui Song2019-10-071-7/+9
| | | | | | | | | | | This makes it clear `ELF/**/*.cpp` files define things in the `lld::elf` namespace and simplifies `elf::foo` to `foo`. Reviewed By: atanasyan, grimar, ruiu Differential Revision: https://reviews.llvm.org/D68323 llvm-svn: 373885
* [ELF] Make MergeInputSection merging aware of output sectionsFangrui Song2019-09-241-10/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes PR38748 mergeSections() calls getOutputSectionName() to get output section names. Two MergeInputSections may be merged even if they are made different by SECTIONS commands. This patch moves mergeSections() after processSectionCommands() and addOrphanSections() to fix the issue. The new pass is renamed to OutputSection::finalizeInputSections(). processSectionCommands() and addorphanSections() are changed to add sections to InputSectionDescription::sectionBases. finalizeInputSections() merges MergeInputSections and migrates `sectionBases` to `sections`. For the -r case, we drop an optimization that tries keeping sh_entsize non-zero. This is for the simplicity of addOrphanSections(). The updated merge-entsize2.s reflects the change. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67504 llvm-svn: 372734
* [Coding style change] Rename variables so that they start with a lowercase ↵Rui Ueyama2019-07-101-205/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | letter This patch is mechanically generated by clang-llvm-rename tool that I wrote using Clang Refactoring Engine just for creating this patch. You can see the source code of the tool at https://reviews.llvm.org/D64123. There's no manual post-processing; you can generate the same patch by re-running the tool against lld's code base. Here is the main discussion thread to change the LLVM coding style: https://lists.llvm.org/pipermail/llvm-dev/2019-February/130083.html In the discussion thread, I proposed we use lld as a testbed for variable naming scheme change, and this patch does that. I chose to rename variables so that they are in camelCase, just because that is a minimal change to make variables to start with a lowercase letter. Note to downstream patch maintainers: if you are maintaining a downstream lld repo, just rebasing ahead of this commit would cause massive merge conflicts because this patch essentially changes every line in the lld subdirectory. But there's a remedy. clang-llvm-rename tool is a batch tool, so you can rename variables in your downstream repo with the tool. Given that, here is how to rebase your repo to a commit after the mass renaming: 1. rebase to the commit just before the mass variable renaming, 2. apply the tool to your downstream repo to mass-rename variables locally, and 3. rebase again to the head. Most changes made by the tool should be identical for a downstream repo and for the head, so at the step 3, almost all changes should be merged and disappear. I'd expect that there would be some lines that you need to merge by hand, but that shouldn't be too many. Differential Revision: https://reviews.llvm.org/D64121 llvm-svn: 365595
* ELF: Introduce a separate bit for tracking whether an output section has ↵Peter Collingbourne2019-06-031-1/+2
| | | | | | | | | | | | | | | | | | ever had an input section added to it. NFCI. We currently (ab)use the Live bit on output sections to track whether the section has ever had an input section added to it, and then later use it during orphan placement. This will conflict with one of my upcoming partition-related changes that will assign all output sections to a partition (thus marking them as live) so that they can be added to the correct segment by the code that creates program headers. Instead of using the Live bit for this purpose, create a new flag and start using it to track the property explicitly. Differential Revision: https://reviews.llvm.org/D62348 llvm-svn: 362444
* [ELF] Delete dead SHT_NOBITS->SHT_PROGBITS code after r358981Fangrui Song2019-05-301-5/+0
| | | | | | | After D60131/r358981, we no longer create SHT_NOBITS sections that may contain ByteCommand (BYTE, SHORT, LONG, QUAD). llvm-svn: 362108
* ELF: Add basic partition data structures and behaviours.Peter Collingbourne2019-05-291-4/+4
| | | | | | | | | | | | | | This change causes us to read partition specifications from partition specification sections and split output sections into partitions according to their reachability from partition entry points. This is only the first step towards a full implementation of partitions. Later changes will add additional synthetic sections to each partition so that they can be loaded independently. Differential Revision: https://reviews.llvm.org/D60353 llvm-svn: 361925
* Use llvm::stable_sortFangrui Song2019-04-231-6/+3
| | | | | | | | | Make some small adjustment while touching the code: make parameters const, use less_first(), etc. Differential Revision: https://reviews.llvm.org/D60989 llvm-svn: 358943
* Replace `typedef A B` with `using B = A`. NFC.Rui Ueyama2019-04-011-2/+2
| | | | | | | | I did this using Perl. Differential Revision: https://reviews.llvm.org/D60003 llvm-svn: 357372
* [ELF][ARM] Recommit Redesign of .ARM.exidx handling to use a SyntheticSectionPeter Smith2019-03-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | Recommit r356666 with fixes for buildbot failure, as well as handling for --emit-relocs, which we decide not to emit any relocation sections as the table is already position independent and an offline tool can deduce the relocations. Instead of creating extra Synthetic .ARM.exidx sections to account for gaps in the table, create a single .ARM.exidx SyntheticSection that can derive the contents of the gaps from a sorted list of the executable InputSections. This has the benefit of moving the ARM specific code for SyntheticSections in SHF_LINK_ORDER processing and the table merging code into the ARM specific SyntheticSection. This also makes it easier to create EXIDX_CANTUNWIND table entries for executable InputSections that don't have an associated .ARM.exidx section. Fixes pr40277 Differential Revision: https://reviews.llvm.org/D59216 llvm-svn: 357160
* [ELF][ARM] Revert Redesign of .ARM.exidx handling to use a SyntheticSectionPeter Smith2019-03-211-3/+1
| | | | | | | | | There is a reproducible buildbot failure (segfault) on the 2 stage clang-cmake-armv8-lld bot. Reverting while I investigate. Differential Revision: https://reviews.llvm.org/D59216 llvm-svn: 356684
* [ELF][ARM] Redesign of .ARM.exidx handling to use a SyntheticSectionPeter Smith2019-03-211-1/+3
| | | | | | | | | | | | | | | | | Instead of creating extra Synthetic .ARM.exidx sections to account for gaps in the table, create a single .ARM.exidx SyntheticSection that can derive the contents of the gaps from a sorted list of the executable InputSections. This has the benefit of moving the ARM specific code for SyntheticSections in SHF_LINK_ORDER processing and the table merging code into the ARM specific SyntheticSection. This also makes it easier to create EXIDX_CANTUNWIND table entries for executable InputSections that don't have an associated .ARM.exidx section. Fixes pr40277 Differential Revision: https://reviews.llvm.org/D59216 llvm-svn: 356666
* ELF: Remove dead code. NFCI.Peter Collingbourne2019-03-121-3/+1
| | | | | | | | The Live bit is already set to false by SectionBase. Differential Revision: https://reviews.llvm.org/D59052 llvm-svn: 355893
* ELF: De-template OutputSection::finalize() and MipsGotSection::build(). NFCI.Peter Collingbourne2019-03-061-10/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D58810 llvm-svn: 355479
* ELF: Write .eh_frame_hdr explicitly after writing .eh_frame.Peter Collingbourne2019-02-281-2/+1
| | | | | | | | | | | This lets us remove the special case from Writer::writeSections(), and also fixes a bug where .eh_frame_hdr isn't necessarily written in the correct order if a linker script moves .eh_frame and .eh_frame_hdr into the same output section. Differential Revision: https://reviews.llvm.org/D58795 llvm-svn: 355153
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* ELF: allow non allocated sections to go into allocated sectionsRui Ueyama2018-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Andrew Kelley. For context, see https://bugs.llvm.org/show_bug.cgi?id=39862 The use case is embedded / OS programming where the kernel wants access to its own debug info via mapped dwarf info. I have a proof of concept of this working, using this linker script snippet: .rodata : ALIGN(4K) { *(.rodata) __debug_info_start = .; KEEP(*(.debug_info)) __debug_info_end = .; __debug_abbrev_start = .; KEEP(*(.debug_abbrev)) __debug_abbrev_end = .; __debug_str_start = .; KEEP(*(.debug_str)) __debug_str_end = .; __debug_line_start = .; KEEP(*(.debug_line)) __debug_line_end = .; __debug_ranges_start = .; KEEP(*(.debug_ranges)) __debug_ranges_end = .; } Differential revision: https://reviews.llvm.org/D55276 llvm-svn: 348291
* [ELF] Make TrapInstr and Filler byte arrays. NFC.Simon Atanasyan2018-11-141-8/+11
| | | | | | | | | | | | The uint32_t type does not clearly convey that these fields are interpreted in the target endianness. Converting them to byte arrays should make this more obvious and less error-prone. Patch by James Clarke Differential Revision: http://reviews.llvm.org/D54207 llvm-svn: 346893
* Remove a global variable that we can live without.Rui Ueyama2018-10-231-1/+0
| | | | | | | | | | Out::DebugInfo was used only by GdbIndex class to determine if we need to create a .gdb_index section, but we can do the same check without it. Added a test that this patch doesn't change the existing behavior. llvm-svn: 345058
* Reset input section pointers to null on each linker invocation.Rui Ueyama2018-09-251-3/+3
| | | | | | | | | | Previously, if you invoke lld's `main` more than once in the same process, the second invocation could fail or produce a wrong result due to a stale pointer values of the previous run. Differential Revision: https://reviews.llvm.org/D52506 llvm-svn: 343009
* [ELF] Pass callables by function_refBenjamin Kramer2018-06-161-2/+2
| | | | | | | No need to create a heavyweight std::function if it's not stored. No functionality change intended. llvm-svn: 334885
* [PPC64] Remove support for ELF V1 ABI in LLDZaara Syeda2018-05-041-2/+0
| | | | | | | | | | | The current support for V1 ABI in LLD is incomplete. This patch removes V1 ABI support and changes the default behavior to V2 ABI, issuing an error when using the V1 ABI. It also updates the testcases to V2 and removes any V1 specific tests. Differential Revision: https://reviews.llvm.org/D46316 llvm-svn: 331529
* [ELF] - Stop setting OutSecOff too early.George Rimar2018-04-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Currently LLD sets OutSecOff in addSection for input sections. That is a fake offset (just a rude approximation to remember the order), used for sorting SHF_LINK_ORDER sections (see resolveShfLinkOrder, compareByFilePosition). There are 2 problems with such approach: 1. We currently change and reuse Size field as a value assigned. Changing size is not good because leads to bugs. Currently, SIZEOF(.bss) for empty .bss returns 2 because we add two empty synthetic sections and increase size twice by 1. (See PR37011: https://bugs.llvm.org/show_bug.cgi?id=37011) 2. Such approach simply does not work when --symbol-ordering-file is involved, because processing of the ordering file might break the initial section order. This fixes PR37011. Differential revision: https://reviews.llvm.org/D45368 llvm-svn: 329560
* [ELF] Simplify compCtors and writeInt.Fangrui Song2018-03-201-6/+3
| | | | | | | | | | Reviewers: ruiu Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D44690 llvm-svn: 328009
* [ELF] - Fix crash relative to SHF_LINK_ORDER sections.George Rimar2018-03-081-1/+2
| | | | | | | | | | | | | | | | | Our code assumes all input sections in an output SHF_LINK_ORDER section has SHF_LINK_ORDER flag. We do not check that and that can cause a crash. That happens because we call std::stable_sort(Sections.begin(), Sections.end(), compareByFilePosition);, where compareByFilePosition predicate does not expect to see null when calls getLinkOrderDep. The same might happen when sections refer to non-regular sections. Test cases demonstrate the issues, patch fixes them. Differential revision: https://reviews.llvm.org/D44193 llvm-svn: 327006
* Initialize a member in C++11 style. NFC.Rui Ueyama2018-03-071-3/+1
| | | | llvm-svn: 326933
* Simplify removing empty output sections.Rafael Espindola2018-03-011-19/+0
| | | | | | | With this the meaning of the Live bit in output sections is clear: we have at some point added a input section into it. llvm-svn: 326401
* Merge {COFF,ELF}/Strings.cpp to Common/Strings.cpp.Rui Ueyama2018-02-281-1/+1
| | | | | | | | | This should resolve the issue that lld build fails in some hosts that uses case-insensitive file system. Differential Revision: https://reviews.llvm.org/D43788 llvm-svn: 326339
* Fix gcc warning.Rafael Espindola2018-02-271-1/+2
| | | | | | Should fix the build in some bots. llvm-svn: 326209
* Add support for SHF_ARM_PURECODE.Rafael Espindola2018-02-271-3/+11
| | | | | | | Now we don't mark a PT_LOAD as readable if all its sections are SHF_ARM_PURECODE. llvm-svn: 326207
* Keep flags from phantom synthetic sections.Rafael Espindola2018-02-261-0/+19
| | | | | | | | | | | | | | | | | | | | | This fixes pr36475. I think this code can be simplified a bit, but I would like to check in the more direct fix if we are in agreement on the direction and then refactor. This is not something that bfd does. The issue is not noticed in bfd because it keeps fewer sections from the linkerscript in the output. The reasons why it seems reasonable to do this: - As George noticed, we would still keep the flags if the output section had both an empty synthetic section and a regular section - We need an heuristic to find the flags of output sections. Using the flags of a synthetic section that would have been there seems a reasonable heuristic. llvm-svn: 326137
* [ELF] - Introduce getInputSections() helper.George Rimar2018-02-221-17/+16
| | | | | | | | | | | We sometimes need to iterate over input sections for a given output section. It is not very convinent because we have to iterate over section descriptions. Patch introduces getInputSections helper, it simplifies things. Differential revision: https://reviews.llvm.org/D43574 llvm-svn: 325763
* Sort each InputSectionDescription individually.Rafael Espindola2018-02-011-3/+3
| | | | | | | | | This fixes pr36190. Thanks to James Henderson for the testcase and for pointing out how to fix this. llvm-svn: 323993
* Sort orphan section if --symbol-ordering-file is given.Rafael Espindola2018-01-301-2/+2
| | | | | | Before this patch orphan sections were not sorted. llvm-svn: 323779
* [ELF] Compress debug sections after assignAddresses and support custom layoutJames Henderson2018-01-081-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, in r320472, I moved the calculation of section offsets and sizes for compressed debug sections into maybeCompress, which happens before assignAddresses, so that the compression had the required information. However, I failed to take account of relocations that patch such sections. This had two effects: 1. A race condition existed when a debug section referred to a different debug section (see PR35788). 2. References to symbols in non-debug sections would be patched incorrectly. This is because the addresses of such symbols are not calculated until after assignAddresses (this was a partial regression caused by r320472, but they could still have been broken before, in the event that a custom layout was used in a linker script). assignAddresses does not need to know about the output section size of non-allocatable sections, because they do not affect the value of Dot. This means that there is no longer a reason not to support custom layout of compressed debug sections, as far as I'm aware. These two points allow for delaying when maybeCompress can be called, removing the need for the loop I previously added to calculate the section size, and therefore the race condition. Furthermore, by delaying, we fix the issues of relocations getting incorrect symbol values, because they have now all been finalized. llvm-svn: 321986
* [ELF] Refactor to remove loop copying all Sections in OS->finalize() [NFC]Peter Smith2017-12-121-10/+11
| | | | | | | | | | Moving the SHF_LINK_ORDER processing out of OutputSection::finalize() means that we no longer need to copy all InputSections as we now only need the first one. Differential Revision: https://reviews.llvm.org/D40966 llvm-svn: 320478
* [ELF] Move SHF_LINK_ORDER processing earlier in Writer.cpp [NFC]Peter Smith2017-12-121-24/+1
| | | | | | | | | | By moving this step before thunk creation and other processing that depends on the size of sections, we permit removal of duplicates in the .ARM.exidx section. Differential Revision: https://reviews.llvm.org/D40964 llvm-svn: 320477
* [ELF] Reset OutputSection size prior to processing linker script commandsJames Henderson2017-12-121-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of an OutputSection is calculated early, to aid handling of compressed debug sections. However, subsequent to this point, unused synthetic sections are removed. In the event that an OutputSection, from which such an InputSection is removed, is still required (e.g. because it has a symbol assignment), and no longer has any InputSections, dot assignments, or BYTE()-family directives, the size member is never updated when processing the commands. If the removed InputSection had a non-zero size (such as a .got.plt section), the section ends up with the wrong size in the output. The fix is to reset the OutputSection size prior to processing the linker script commands relating to that OutputSection. This ensures that the size is correct even in the above situation. Additionally, to reduce the risk of developers misusing OutputSection Size and InputSection OutSecOff, they are set to simply the number of InputSections in an OutputSection, and the corresponding index respectively. We cannot completely stop using them, due to SHF_LINK_ORDER sections requiring them. Compressed debug sections also require the full size. This is now calculated in maybeCompress for these kinds of sections. Reviewers: ruiu, rafael Differential Revision: https://reviews.llvm.org/D38361 llvm-svn: 320472
* [ELF] Change default output section type to SHT_NOBITSJake Ehrlich2017-12-111-0/+2
| | | | | | | | | | | | | | | | When an output section has no byte commands and has no input sections then it would be ideal if the type of the section is SHT_NOBITS so that the file can take up less space. This change sets the default type of of output sections to SHT_NOBITS instead of SHT_PROGBITS to allow this. This required some minor test changes (which double as tests for this new behavior) but extend-pt-load.s had be changed in a non-trivial way. Since it seems to me that the point of the test is to point out the consequences of how flags are assigned to output sections that don't have input sections I changed the test to work and still show how the memsize of the executable segment was changed. Differential Revision: https://reviews.llvm.org/D41082 llvm-svn: 320437
* Move Memory.{h,cpp} to Common.Rui Ueyama2017-11-281-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D40571 llvm-svn: 319221
* Drop conflicting sh_entsize values.Rafael Espindola2017-11-151-8/+6
| | | | | | | | An output section can include elements from two input sections with different sh_entsize. When that happens the output section itself should not have a sh_entsize. llvm-svn: 318311
* Move OutputSectionFactory to LinkerScript.cpp. NFC.Rui Ueyama2017-11-041-101/+0
| | | | | | | | That class is used only by LinkerScript.cpp, so we should move it to that file. Also, it no longer has to be a "factory" class. It can just be a non-member function. llvm-svn: 317427
* [ELF] - Stop using SectionKey for creating output sections.George Rimar2017-11-041-75/+49
| | | | | | | | | | | | | | | | | | | | | | Stop using SectionKey for creating output sections. Initially SectionKey was designed because we merged section with use of Flags and Alignment fields. Currently LLD merges them by name only, except the case when -relocatable output is produced. In that case we still merge sections only with the same flags and alignment. There is probably no issue at all to stop using Flags and Alignment for -r and just disable the merging in that case. After doing that change we can get rid of using SectionKey. That is not only simplifies the code, but also gives some perfomance boost. I tried to link chrome and mozilla, results are next: * chrome link time goes from 1,666750355s to 1,551585364s, that is about 7%. * mozilla time changes from 3,210261947 to 3,153782940, or about 2%. Differential revision: https://reviews.llvm.org/D39594 llvm-svn: 317406
* Rename SymbolBody -> SymbolRui Ueyama2017-11-031-1/+1
| | | | | | | | | | | | | Now that we have only SymbolBody as the symbol class. So, "SymbolBody" is a bit strange name now. This is a mechanical change generated by perl -i -pe s/SymbolBody/Symbol/g $(git grep -l SymbolBody lld/ELF lld/COFF) nd clang-format-diff. Differential Revision: https://reviews.llvm.org/D39459 llvm-svn: 317370
* [ELF] - Remove useless code. NFC.George Rimar2017-10-311-2/+0
| | | | | | | We set Type and Flags inside OutputSection::addSection, so this lines looks to be excessive. llvm-svn: 317002
* [ELF] - Stop sorting input sections in createSections().George Rimar2017-10-301-0/+1
| | | | | | | | | | It does not seem that createSections() is a good place for applying sorting. Patch changes code to do that inside sortSections(), which looks more appropriate place. Differential revision: https://reviews.llvm.org/D39371 llvm-svn: 316893
OpenPOWER on IntegriCloud