[llvm-branch-commits] [clang] d8949a8 - [hip] Fix host object creation from fatbin

Michael Liao via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Dec 2 07:40:37 PST 2020


Author: Michael Liao
Date: 2020-12-02T10:36:01-05:00
New Revision: d8949a8ad3ca2a39ffe69df76e2c3f5fd73efec0

URL: https://github.com/llvm/llvm-project/commit/d8949a8ad3ca2a39ffe69df76e2c3f5fd73efec0
DIFF: https://github.com/llvm/llvm-project/commit/d8949a8ad3ca2a39ffe69df76e2c3f5fd73efec0.diff

LOG: [hip] Fix host object creation from fatbin

- `__hip_fatbin` should a symbol in `.hip_fatbin` section.

Differential Revision: https://reviews.llvm.org/D92418

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/HIP.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/HIP.cpp b/clang/lib/Driver/ToolChains/HIP.cpp
index a06835eee024..fc1103b48a99 100644
--- a/clang/lib/Driver/ToolChains/HIP.cpp
+++ b/clang/lib/Driver/ToolChains/HIP.cpp
@@ -178,8 +178,7 @@ void AMDGCN::Linker::constructGenerateObjFileFromHIPFatBinary(
   ObjStream << "#       HIP Object Generator\n";
   ObjStream << "# *** Automatically generated by Clang ***\n";
   ObjStream << "  .type __hip_fatbin, at object\n";
-  ObjStream << "  .section .hip_fatbin,\"aMS\", at progbits,1\n";
-  ObjStream << "  .data\n";
+  ObjStream << "  .section .hip_fatbin,\"a\", at progbits\n";
   ObjStream << "  .globl __hip_fatbin\n";
   ObjStream << "  .p2align " << llvm::Log2(llvm::Align(HIPCodeObjectAlign))
             << "\n";


        


More information about the llvm-branch-commits mailing list