binutils/readelf: handle AMDGPU OS ABIs
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 16 Mar 2022 13:01:04 +0000 (09:01 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 16 Mar 2022 13:01:04 +0000 (09:01 -0400)
commit37870be8740a4f903a61d43e6c1adede415473a9
tree5b0f8f6885453f3ac2be9709bf9184680595b969
parente3161106097bfa596f203e8b5a8d98c1102a9871
binutils/readelf: handle AMDGPU OS ABIs

When the machine is EM_AMDGPU, handle the various OS ABIs described
here:

  https://llvm.org/docs/AMDGPUUsage.html#header

For a binary with the HSA OS ABI, the change looks like:

-  OS/ABI:                            <unknown: 40>
+  OS/ABI:                            AMD HSA

binutils/ChangeLog:

* readelf.c (get_osabi_name): Handle EM_AMDGPU OS ABIs.

include/ChangeLog:

* elf/common.h (ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D):
New.

Change-Id: I383590c390f7dc2fe0f902f50038735626d71863
binutils/ChangeLog
binutils/readelf.c
include/ChangeLog
include/elf/common.h