diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-03-16 09:01:04 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2022-03-16 09:01:04 -0400 |
commit | 37870be8740a4f903a61d43e6c1adede415473a9 (patch) | |
tree | 5b0f8f6885453f3ac2be9709bf9184680595b969 /binutils | |
parent | e3161106097bfa596f203e8b5a8d98c1102a9871 (diff) | |
download | fsf-binutils-gdb-37870be8740a4f903a61d43e6c1adede415473a9.zip fsf-binutils-gdb-37870be8740a4f903a61d43e6c1adede415473a9.tar.gz fsf-binutils-gdb-37870be8740a4f903a61d43e6c1adede415473a9.tar.bz2 |
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
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index bb71e5c..694ad49 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2022-03-16 Simon Marchi <simon.marchi@efficios.com> + + * readelf.c (get_osabi_name): Handle EM_AMDGPU OS ABIs. + 2022-03-16 Nick Clifton <nickc@redhat.com> * po/sr.po: Updated Serbian translation. diff --git a/binutils/readelf.c b/binutils/readelf.c index 8b46052..e8974aa 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -4284,6 +4284,17 @@ get_osabi_name (Filedata * filedata, unsigned int osabi) if (osabi >= 64) switch (filedata->file_header.e_machine) { + case EM_AMDGPU: + switch (osabi) + { + case ELFOSABI_AMDGPU_HSA: return "AMD HSA"; + case ELFOSABI_AMDGPU_PAL: return "AMD PAL"; + case ELFOSABI_AMDGPU_MESA3D: return "AMD Mesa3D"; + default: + break; + } + break; + case EM_ARM: switch (osabi) { |