[all-commits] [llvm/llvm-project] 974f97: [dwarfdump][AMDGPU] Support EF_AMDGPU_MACH_NONE
Scott Linder via All-commits
all-commits at lists.llvm.org
Wed Apr 19 08:02:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 974f973d26a688f830fc7204a452b63f2f6cf868
https://github.com/llvm/llvm-project/commit/974f973d26a688f830fc7204a452b63f2f6cf868
Author: Scott Linder <Scott.Linder at amd.com>
Date: 2023-04-19 (Wed, 19 Apr 2023)
Changed paths:
M llvm/lib/Object/RelocationResolver.cpp
A llvm/test/tools/llvm-dwarfdump/AMDGPU/amdgpu-relocs.yaml
A llvm/test/tools/llvm-dwarfdump/AMDGPU/lit.local.cfg
Log Message:
-----------
[dwarfdump][AMDGPU] Support EF_AMDGPU_MACH_NONE
A quirk of the AMDGPU backend is EF_AMDGPU_MACH_NONE, which is not
specific to the r600 or amdgcn architecture, but can be combined with
either.
AMDGPU ELF code objects with this mach value cannot be mapped back to a
Triple architecture, as it could be either r600 or amdgcn. For
llvm-dwarfdump this means the normal method of inspecting
ObjectFile::getArch to determine how to handle relocations is
insufficient.
This patch adds an extra check for ELF code objects which would
otherwise be categorized as UnknownArch, making it possible to use
llvm-dwarfdump with them. For completeness it also adds support for
known r600 machines.
This also adds specific tests for llvm-dwarfdump for amdgcn and r600,
both with known and unknown mach values.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D144301
More information about the All-commits
mailing list