[PATCH] D65478: Create unique, but identically-named ELF sections for explicitly-sectioned functions and globals when using -function-sections and -data-sections.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 15:56:23 PDT 2019
pcc accepted this revision.
pcc added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:591
+
+ // If we have -ffunction-section or -fdata-section then we should emit the
+ // global value to a uniqued section of the same name.
----------------
nit: `s/section/sections/g`
================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:610
+ unsigned UniqueID = MCContext::GenericSectionID;
+ if (EmitUniqueSection){
+ UniqueID = NextUniqueID++;
----------------
Remove braces
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65478/new/
https://reviews.llvm.org/D65478
More information about the llvm-commits
mailing list