From 24ebdb6c255e0168e4518cc7f0c465b53867abf8 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 3 Mar 2022 14:56:13 -0500 Subject: [CUDA] Add CUDA fatbinary magic Nvidia uses fatbinaries to bundle all of their device code. This patch adds the magic number "0x50ed55ba" used in their propeitary format to the list of magic identifies. This is technically undocumented and could unlikely be changed by Nvidia in the future. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D120932 --- llvm/lib/Object/ObjectFile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Object/ObjectFile.cpp') diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp index fedf737..2e3c2ed 100644 --- a/llvm/lib/Object/ObjectFile.cpp +++ b/llvm/lib/Object/ObjectFile.cpp @@ -146,6 +146,7 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type, case file_magic::pdb: case file_magic::minidump: case file_magic::goff_object: + case file_magic::cuda_fatbinary: return errorCodeToError(object_error::invalid_file_type); case file_magic::tapi_file: return errorCodeToError(object_error::invalid_file_type); -- cgit v1.1