[llvm] XCOFF associated metadata (PR #159096)
Wael Yehia via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 07:41:52 PDT 2025
================
@@ -8157,6 +8158,23 @@ Example:
@b = internal global i32 2, comdat $a, section "abc", !associated !0
!0 = !{ptr @a}
+XCOFF Targets
+"""""""""""""
+
+This metadata lowers to the .ref assembly directive which will add a relocation
+representing an implicit reference from the section the global belongs to, to
+the associated symbol. This link will keep the associated symbol alive if the
+section is not garbage collected. More than one associated node can be attached
+to the same global variable.
----------------
w2yehia wrote:
The verifier currently checks the first `!associated`, but now it should be taught to check many.
https://github.com/llvm/llvm-project/pull/159096
More information about the llvm-commits
mailing list