[PATCH] D49716: ELF: Do not ICF SHF_LINK_ORDER sections.

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 24 03:24:04 PDT 2018


peter.smith added a comment.

I definitely think that it is the right thing to do to consider the section and the SHF_LINK_ORDER section as a unit. I'm assuming that no merging of the code sections is done if the SHF_LINK_ORDER sections are different.



================
Comment at: lld/test/ELF/icf-link-order.s:3
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: ld.lld %t.o -o %t --icf=all --print-icf-sections | count 0
----------------
Some suggestions for additional cases:
- Two identical executable sections but only one of the sections has a SHF_LINK_ORDER section, for example -fno-exceptions in a subset of the files.
- Two identical executable sections but two different SHF_LINK_ORDER sections. I don't think that this is likely with Arm exception tables but it may be possible with other uses of SHF_LINK_ORDER. 


https://reviews.llvm.org/D49716





More information about the llvm-commits mailing list