[PATCH] D35639: [LTO] Prevent dead stripping and internalization of symbols with sections

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 09:13:59 PDT 2017

tejohnson marked 6 inline comments as done.
tejohnson added inline comments.

Comment at: include/llvm/Object/IRSymtab.h:130
+  /// suppress the generation of the special __start_ and __end_ symbols.
+  bool HasELFCIdentifierSectionName;
pcc wrote:
> I'd prefer to put the entire section name in here so that we can use it for the things I mentioned earlier.
> Otherwise this can be moved to Symbol::Flags, there's plenty of space there.
Changed to track section name.

Comment at: test/tools/gold/X86/global_with_section.ll:10
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold.so \
+; RUN:     -u foo \
+; RUN:     --plugin-opt=save-temps \
pcc wrote:
> Is the "-u foo" part necessary? Same below.
Turns out no, so I removed foo. This was a carry over from when I was testing the LTO-only version of the fix, using internal tools that expected to have an exported symbol.


More information about the llvm-commits mailing list