[PATCH] D84363: [XCOFF][AIX] Handle llvm.used and llvm.compiler.used global array

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 13:57:34 PDT 2020


DiggerLin added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1682
+static bool isSpecialLLVMGlobalArrayToSkip(const GlobalVariable *GV) {
+  return GV->hasAppendingLinkage() &&
+         StringSwitch<bool>(GV->getName())
----------------
not sure llvm.global_ctors must have an appending Linkage or not, I can not any information that talk about the llvm.global_ctors must having an appending Linkage.
in the 
https://llvm.org/docs/LangRef.html , I can find the description as "
The @llvm.used global is an array which has appending linkage. "

and 
"appending
“appending” linkage may only be applied to global variables of pointer to array type. When two global variables with appending linkage are linked together, the two global arrays are appended together. This is the LLVM, typesafe, equivalent of having the system linker append together “sections” with identical names when .o files are linked"

but not for the llvm.global_ctors 




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

https://reviews.llvm.org/D84363





More information about the llvm-commits mailing list