[PATCH] D43703: Keep flags from phantom synthetic sections

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 01:30:37 PST 2018


jhenderson accepted this revision.
jhenderson added a comment.

LGTM, with a couple of comment nits.



================
Comment at: ELF/Writer.cpp:1386-1387
 
     // If there are no other alive input sections left, we remove output
     // section from the output.
+    if (getInputSections(OS).empty() && OS->isAllSectionDescription())
----------------
Might want to revert this comment back to what it used to say.


================
Comment at: test/ELF/linkerscript/empty-synthetic-removed-flags.s:8
 ## We have ".got.plt" synthetic section with SHF_ALLOC|SHF_WRITE flags.
 ## It is empty, so linker removes it, but it have to keep ".got.plt" output
 ## section because of BYTE command. Here we check that result output section
----------------
have -> has


https://reviews.llvm.org/D43703





More information about the llvm-commits mailing list