[llvm] XCOFF associated metadata (PR #159096)

Sean Fertile via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 08:59:11 PDT 2025


mandlebug wrote:

Thanks for the review Wael, I've addressed the first couple comments and am adding testing of the binary output next.

@MaskRay, @eugenis  - Any concerns with reusing the metadata for the XCOFF ref relationship? In both cases we have an implicit dependency that is otherwise opaque to the compiler which we are making explicit to effect garbage collection. IIUC though the dependence is the opposite direction between ELF and XCOFF, IE for XCOFF if the section of the symbol the metadata is on is not garbage collected then the associated symbol will also be kept alive, while on ELF if the associated symbol is not garbage collected then the globals the metadata is on will be kept alive. I can create a new metadata instead if there are any concerns, however I wanted to reuse associated mainly because in the LangRef it mentions associated can’t be unconditionally dropped unless the global is itself deleted.

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


More information about the llvm-commits mailing list