[llvm] Add --offoading option to llvm-readobj (PR #143342)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 5 00:29:29 PDT 2025
================
@@ -0,0 +1,28 @@
+## Test that --offloading with a fatbin works correctly.
+# REQUIRES: target={{x86_64-.*-linux.*}}
+# REQUIRES: amdgpu-registered-target
+
+# RUN: yaml2obj %s -o %t.elf
+# RUN: llvm-readobj --offloading %t.elf | \
+# RUN: FileCheck %s -DFILE_NAME=%t.elf
+
+# CHECK: host-x86_64-unknown-linux-- file://[[FILE_NAME]]#offset=8192&size=0
+# CHECK-NEXT: hipv4-amdgcn-amd-amdhsa--gfx908 file://[[FILE_NAME]]#offset=8192&size=4048
+
+--- !ELF
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_EXEC
+Sections:
+ - Name: .hip_fatbin
+ Type: SHT_PROGBITS
+ AddressAlign: 0x1000
----------------
jh7370 wrote:
Coming back to an earlier comment that seems to have got missed: why is this AddressAlign needed?
https://github.com/llvm/llvm-project/pull/143342
More information about the llvm-commits
mailing list