[llvm-branch-commits] [llvm] [SystemZ] Implement ctor/dtor emission via @@SQINIT and .xtor sections (PR #171476)

Amy Kwan via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 6 11:41:41 PST 2026


================
@@ -2857,3 +2861,48 @@ MCSection *TargetLoweringObjectFileGOFF::SelectSectionForGlobal(
   }
   return TextSection;
 }
+
+static MCSectionGOFF *getStaticStructorSectionGOFF(MCContext &Ctx,
+                                                   const MCSection *TextSection,
+                                                   bool IsCtor,
----------------
amy-kwan wrote:

Good point. We don't have two separate .ctor and .dtor sections. Instead, the section has one data structure and the position of the pointer inside the data structure determines if we have a .ctor or a .dtor.

The parameter is unused, so we can get rid of it and update the caller of this function accordingly. 

https://github.com/llvm/llvm-project/pull/171476


More information about the llvm-branch-commits mailing list