diff options
author | Fangrui Song <maskray@google.com> | 2019-09-24 11:48:31 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-09-24 11:48:31 +0000 |
commit | e47bbd28f8e9dfea4e019e27e9d371c144c3302e (patch) | |
tree | 799459668b1b23aa9f3691564487958ff364ac0c /lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp | |
parent | 06cdcb5f68b923c7e6e632edd91f49e4f9dd653e (diff) | |
download | bcm5719-llvm-e47bbd28f8e9dfea4e019e27e9d371c144c3302e.tar.gz bcm5719-llvm-e47bbd28f8e9dfea4e019e27e9d371c144c3302e.zip |
[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
llvm-svn: 372734
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/main.cpp')
0 files changed, 0 insertions, 0 deletions