[llvm] [llvm-readobj] Print AMDGPU specific values in GNU mode (PR #75661)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 17 22:57:52 PST 2023
================
@@ -3630,6 +3641,28 @@ template <class ELFT> void GNUELFDumper<ELFT>::printFileHeaders() {
else if (e.e_machine == EM_XTENSA)
ElfFlags = printFlags(e.e_flags, ArrayRef(ElfHeaderXtensaFlags),
unsigned(ELF::EF_XTENSA_MACH));
+ else if (e.e_machine == EM_AMDGPU) {
+ switch (e.e_ident[ELF::EI_ABIVERSION]) {
+ default:
+ break;
+ case 0:
+ // ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D support *_V3 flags.
+ [[fallthrough]];
+ case ELF::ELFABIVERSION_AMDGPU_HSA_V3:
+ ElfFlags =
+ printFlags(e.e_flags, ArrayRef(ElfHeaderAMDGPUFlagsABIVersion3),
----------------
arsenm wrote:
I'm surprised you need the ArrayRef
https://github.com/llvm/llvm-project/pull/75661
More information about the llvm-commits
mailing list