[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:40 PST 2026


================
@@ -189,18 +191,23 @@ uint32_t SystemZAsmPrinter::AssociatedDataAreaTable::insert(const MCSymbol *Sym,
     break;
   }
 
+  // Language Environment DLL logic requires function descriptors, for
+  // imported functions, that are placed in the ADA to be 8 byte aligned.
+  if (SlotKind == SystemZII::MO_ADA_DIRECT_FUNC_DESC)
+    NextDisplacement = alignTo(NextDisplacement, 8);
   uint32_t Displacement = NextDisplacement;
   Displacements[std::make_pair(Sym, SlotKind)] = NextDisplacement;
   NextDisplacement += Length;
 
-  return Displacement;
+  return std::pair(Sym, Displacement);
----------------
amy-kwan wrote:

I've separated it out to another PR: https://github.com/llvm/llvm-project/pull/174593

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


More information about the llvm-branch-commits mailing list