[llvm] XCOFF associated metadata (PR #159096)
Sean Fertile via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 24 09:14:01 PDT 2025
mandlebug wrote:
Now that I understand `SHF_LINK_ORDER` better I think trying to extend the associated metadata for XCOFF is the wrong approach. The ref relocation is used in the same situation (ie trying to make an explicit link between metadata sections to direct garbage collection) but the inverted relationship compared to SHF_LINK_ORDER, missing the link error if a metadata section is referred to by another section, the fact that the ref directive is also useful in other contexts , as well as potentially needing more then 1 on a global variable makes it more appropriate to add a new metadata instead. In light of #147427 I think it makes sense to add a new metadata kind that can expand out to the ref relocation on XCOFF and the NONE relocation on ELF. That way associated keeps its very specific semantics it has now, and we have a mechanism for emitting these REF/NONE relocations either on functions or data.
https://github.com/llvm/llvm-project/pull/159096
More information about the llvm-commits
mailing list