[llvm] XCOFF associated metadata (PR #159096)
Wael Yehia via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 12:32:37 PDT 2025
================
@@ -8440,6 +8440,35 @@ Example:
The ``nofree`` metadata indicates the memory pointed by the pointer will not be
freed after the attached instruction.
+'``ref``' Metadata
+^^^^^^^^^^^^^^^^^^
+
+The ``ref`` metadata may be attached to a global variable definition with a
+single argument that references a global object. The metadata is lowered to a
+.ref directive which will emit a relocation introducing an explicit dependence
+to the referenced symbol. This is typically used when there is some implicit
+dependence between the symbols that is otherwise opaque to the linker. One such
+example is metadata which is accessed by a runtime with associated
+``__start_<section_name>`` and ``__stop_<section_name>`` symbols.
+
+This metadata lowers to the .ref assembly directive which will add a relocation
----------------
w2yehia wrote:
We already described what the MD is lowered too.
https://github.com/llvm/llvm-project/pull/159096
More information about the llvm-commits
mailing list