[PATCH] D67504: [ELF] Make SHF_MERGE merging aware of output sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 09:15:03 PDT 2019
MaskRay updated this revision to Diff 219936.
MaskRay added a comment.
Delete unrelated InputSectionIterator (I tried changing `InputSectionDescription::sections` from an InputSection* vector to InputSectionBase* vector, but the result is not clean - many subsequent passes assume the elements of `sections` are InputSections. The size of OutputSection is not a big concern, so I added another field instead)
Fix a comment.
Add `llvm::erase_if(inputSections, [](InputSectionBase *s) { return isa<MergeInputSection>(s); });` to fix an assetion failure
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67504/new/
https://reviews.llvm.org/D67504
Files:
ELF/Driver.cpp
ELF/LinkerScript.cpp
ELF/LinkerScript.h
ELF/OutputSections.cpp
ELF/OutputSections.h
ELF/Relocations.cpp
ELF/SyntheticSections.cpp
ELF/SyntheticSections.h
ELF/Writer.cpp
test/ELF/linkerscript/merge-output-sections.s
test/ELF/linkerscript/merge-sections.s
test/ELF/merge-entsize2.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67504.219936.patch
Type: text/x-patch
Size: 24233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190912/267733f0/attachment.bin>
More information about the llvm-commits
mailing list