For the amdpal OS type:
We write an AMDGPU_PAL_METADATA record in the .note section in the ELF
(or as an assembler directive). It contains key=value pairs of 32 bit
ints. It is a merge of metadata from codegen of the shaders, and
metadata provided by the frontend as _amdgpu_pal_metadata IR metadata.
Where both sources have a key=value with the same key, the two values
are ORed together.
We also write an AMDGPU_PAL_CODE_OBJECT_VERSION .note record, containing
a single 32 bit int giving the minor PAL ABI version, and an
AMDGPU_HSA_ISA .note record, same as used in HSA.
These .note records are part of the amdpal ABI and will be documented in
docs/AMDGPUUsage.rst in a future commit.
Eventually the amdpal OS type will stop generating the .AMDGPU.config
section once the frontend has safely moved over to using the .note
records above instead of .AMDGPU.config.
The usual metadata naming convention uses . separators without leading _ (I also don't see any tests using this)