================
@@ -914,6 +918,9 @@ bool GCOVProfiler::emitProfileNotes(
         GlobalVariable *Counters = new GlobalVariable(
             *M, CounterTy, false, GlobalValue::InternalLinkage,
             Constant::getNullValue(CounterTy), "__llvm_gcov_ctr");
+        const llvm::Triple &Triple = llvm::Triple(M->getTargetTriple());
+        if (Triple.getObjectFormat() == llvm::Triple::XCOFF)
+          Counters->setSection("__llvm_gcov_ctr_section");
----------------
hubert-reinterpretcast wrote:

I suggest moving the `.ref` generation to be from each GCOV-profiled function 
in the module instead of making this change. This change modifies the counters 
from being BSS in XCOFF to non-BSS (therefore increasing program load costs).

https://github.com/llvm/llvm-project/pull/108570
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to