aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorDavid Salinas <dsalinas@amd.com>2025-05-16 09:39:15 -0400
committerGitHub <noreply@github.com>2025-05-16 09:39:15 -0400
commit910220b84fa18ce2cbb2e21dd53b9f3d0ae582a7 (patch)
tree8b828e77ef540dc066d12029de8a10b747c4948b /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent689a960b693446f0d258240fea0c844b6e685d6e (diff)
downloadllvm-910220b84fa18ce2cbb2e21dd53b9f3d0ae582a7.zip
llvm-910220b84fa18ce2cbb2e21dd53b9f3d0ae582a7.tar.gz
llvm-910220b84fa18ce2cbb2e21dd53b9f3d0ae582a7.tar.bz2
Reapply: [llvm-objdump] Add support for HIP offload bundles (#140128)
Utilize the new extensions to the LLVM Offloading API to extend to llvm-objdump to handle dumping fatbin offload bundles generated by HIP. This extension to llvm-objdump adds the option --offload-fatbin. Specifying this option will take the input object/executable and extract all offload fatbin bundle entries into distinct code object files with names reflecting the source file name combined with the Bundle Entry ID. Users can also use the --arch-name option to filter offload fatbin bundle entries by their target triple. --------- Co-authored-by: dsalinas <dsalinas@MKM-L1-DSALINAS.amd.com>
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 7a778da..ab26a42 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -56,6 +56,7 @@
#include "llvm/Object/MachO.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/OffloadBinary.h"
+#include "llvm/Object/OffloadBundle.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
@@ -3361,7 +3362,7 @@ static void dumpObject(ObjectFile *O, const Archive *A = nullptr,
if (FaultMapSection)
printFaultMaps(O);
if (Offloading)
- dumpOffloadBinary(*O);
+ dumpOffloadBinary(*O, StringRef(ArchName));
}
static void dumpObject(const COFFImportFile *I, const Archive *A,