[PATCH] D88615: [XCOFF] Enable explicit sections on AIX

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 08:45:33 PDT 2020


DiggerLin added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSectionXCOFF.h:39
   StringRef SymbolTableName;
+  bool MultiSymbolsAllowed;
   static constexpr unsigned DefaultAlignVal = 4;
----------------
Using MultiSymbolsAllowed  to represent whether the section is generated for separate function or separated data variable when -function-section or -data-section .

what about to change the MultiSymbolsAllowed to IsSymbolNameAsSectionName ?


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2285
+                         Func->isDeclaration() ? XCOFF::XTY_ER : XCOFF::XTY_SD,
+                         SectionKind::getText())
         ->getQualNameSymbol();
----------------
is there possible, something like ? 

int b __attribute__((section("a"))) = 2;
void a(void)  {
}
and compile with -function-section?


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

https://reviews.llvm.org/D88615



More information about the llvm-commits mailing list