[PATCH] D65478: Create unique, but identically-named ELF sections for explicitly-sectioned functions when using -function-sections.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 14:38:26 PDT 2019


pcc added a comment.

I am in favour of this change.

Should we do the same for globals+data sections?



================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:596
     Flags |= ELF::SHF_LINK_ORDER;
+  } else if(F && TM.getFunctionSections()){
+    // Also, if -ffunction-sections is used and the global is a function, then
----------------
clang-format


================
Comment at: test/CodeGen/X86/explicit-function-sections.ll:20
+; FSECTIONS:		f:
+; FSECTIONS:		.section	special_section,"ax", at progbits
+; FSECTIONS-NOT: 	section
----------------
Shouldn't there be a `,unique,1` here?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65478/new/

https://reviews.llvm.org/D65478





More information about the llvm-commits mailing list