Docs by @tpr
Diff Detail
Event Timeline
include/llvm/Object/ELFObjectFile.h | ||
---|---|---|
1067–1069 | Perhaps this should be: if (EF.getHeader()->e_ident[ELF::EI_CLASS] != ELF::ELFCLASS64) return Triple::amdgcn; return Triple::UnknownArch; The amdgcn only supports 64 bit and is independent of the OS. | |
tools/llvm-readobj/ELFDumper.cpp | ||
3521–3523 | Should this be: if (e->e_machine == ELF::EM_AMDGPU && (e->e_ident[ELF::EI_OSABI] >= ELF::EI_FIRST_ARCH && e->e_ident[ELF::EI_OSABI] <= ELF::EI_LAST_ARCH)) Since only this range is the architecture specific, and other values should be handled by the ElfOSABI table. Technically there are some entries in that table that are architecture specific and probably ought to be handled in a similar way so that different architectures can use the same values, but if desired that can be done as another patch. |
Address review feedback.
tools/llvm-readobj/ELFDumper.cpp | ||
---|---|---|
3521–3523 | Yes, I was planning to do it in separate patch. |
tools/llvm-readobj/ELFDumper.cpp | ||
---|---|---|
3521–3523 | Still think should be testing the range of architecture specific codes, and use the general case if outside the range. |
Should a TODO be added to suggest adding an e_flags bit to distinguish between the amdgcn and r600 architectures?