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
This commit is contained in:
committed by
Simon Marchi
parent
e316110609
commit
37870be874
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2022-03-16 Simon Marchi <simon.marchi@efficios.com>
|
||||
|
||||
* elf/common.h (ELFOSABI_AMDGPU_PAL, ELFOSABI_AMDGPU_MESA3D):
|
||||
New.
|
||||
|
||||
2022-03-16 Simon Marchi <simon.marchi@efficios.com>
|
||||
|
||||
* elf/amdgpu.h: New.
|
||||
|
||||
@@ -79,7 +79,9 @@
|
||||
#define ELFOSABI_C6000_ELFABI 64 /* Bare-metal TMS320C6000 */
|
||||
#define ELFOSABI_AMDGPU_HSA 64 /* AMD HSA Runtime */
|
||||
#define ELFOSABI_C6000_LINUX 65 /* Linux TMS320C6000 */
|
||||
#define ELFOSABI_AMDGPU_PAL 65 /* AMD PAL Runtime */
|
||||
#define ELFOSABI_ARM_FDPIC 65 /* ARM FDPIC */
|
||||
#define ELFOSABI_AMDGPU_MESA3D 66 /* AMD Mesa3D Runtime */
|
||||
#define ELFOSABI_ARM 97 /* ARM */
|
||||
#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user