ELFOSABI value range 64-255 is architecture-specific.
Details
Details
Diff Detail
Diff Detail
Event Timeline
include/llvm/BinaryFormat/ELF.h | ||
---|---|---|
337–338 | Suggest group by architecture. | |
338 | // First architecture-specific OS ABI | |
339 | // Last architecture-specific OS ABI | |
tools/llvm-readobj/ELFDumper.cpp | ||
3527 | Should the range checking also apply to the other architecture cases: ELFOSABI_C6000_ELFABI = 64, // Bare-metal TMS320C6000 ELFOSABI_C6000_LINUX = 65, // Linux TMS320C6000 ELFOSABI_ARM = 97, // ARM Not sure where ELFOSABI_STANDALONE belongs so maybe treat it as a non-architecture value even though it is in the range. For example: auto OSABI = makeArrayRef(ElfOSABI); if (e->e_ident[ELF::EI_OSABI] >= ELF::ELFOSABI_FIRST_ARCH && e->e_ident[ELF::EI_OSABI] <= ELF::ELFOSABI_LAST_ARCH) { switch (e->e_machine) { case ELF::EM_ARM: OSABI = makeArrayRef(ARMElfOSABI); break; case ELF::EM_TI_C6000: OSABI = makeArrayRef(C6000ElfOSABI); break; case ELF::EM_AMDGPU: OSABI = makeArrayRef(AMDGPUElfOSABI); break; } } W.printEnum("OS/ABI", e->e_ident[ELF::EI_OSABI], OSABI); |