[PATCH 1/4] elf: Add definition for SHT_LLVM_ADDRSIG.

Tatsuyuki Ishi ishitatsuyuki@gmail.com
Thu May 26 10:36:46 GMT 2022


> Values in [..._LOOS,..._HIOS] pertain to particular OSes (i.e.
> ELFOSABI_* values in the header). LLVM isn't really an OS by itself
> (and I'm also unaware of ELFOSABI_LLVM existing), so I expect there
> are certain ELFOSABI_* values to which SHT_LLVM_* apply. Otherwise
> how are collisions with other OSes' SHT_<OS>_... values avoided?

I'm not a LLVM contributor, but unfortunately it seems like the answer
is that they do not follow the practice of constraining these values
based on EI_OSABI, and they are basically treated as same as non-OS
specific values [1].

[1] https://github.com/llvm/llvm-project/blob/09c2b7c35af8c4bad39f03e9f60df8bd07323028/llvm/lib/Object/ELF.cpp#L232-L307

---
Tatsuyuki


More information about the Binutils mailing list