commit | e32dec685a5d0e7fc5ce703aae21bf4e0b2c2ccf | [log] [tgz] |
---|---|---|
author | Fangrui Song <maskray@google.com> | Tue Sep 24 11:48:31 2019 +0000 |
committer | Fangrui Song <maskray@google.com> | Tue Sep 24 11:48:31 2019 +0000 |
tree | 3741d300c298c92078ab2e89ded744188c0dfb4c | |
parent | b41af6025a187c7c1dd00ef25e04d6effbfcc4d5 [diff] |
[ELF] Make MergeInputSection merging aware of output sections 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 git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@372734 91177308-0d34-0410-b5e6-96231b3b80d8
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.