[llvm] XCOFF associated metadata (PR #159096)
Sean Fertile via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 18 18:11:37 PDT 2025
================
@@ -8124,6 +8124,13 @@ See :doc:`CalleeTypeMetadata`.
The ``associated`` metadata may be attached to a global variable definition with
a single argument that references a global object (optionally through an alias).
+The metadata is often used with an explicit section consisting of valid C
+identifiers so that the runtime can find the metadata section with
+linker-defined encapsulation symbols ``__start_<section_name>`` and
----------------
mandlebug wrote:
Thanks, that was very informative. I still need to read through the linked 'COMDAT and section group' blog post as its relevant to this work as well. This and the rename metadata together is our solution to scenario 2 you describe in the post (the metadata sections are allocatable and appear unreferenced from the code but will be referenced from the runtime), and sort of replicates section groups IIUC. On AIX garbage collection is enabled by default and code is usually compiled with both data sections and function sections enabled. This can lead to people having builds that need linker garbage collection on and working well to function sometimes.
By naming convention do you mean creating the symbols as `__start_<section_name>` and `__stop_<section_name>`? If so yes it follows the same convention.
https://github.com/llvm/llvm-project/pull/159096
More information about the llvm-commits
mailing list