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,@object\n"; - ObjStream << " .section .hip_fatbin,\"aMS\",@progbits,1\n"; - ObjStream << " .data\n"; + ObjStream << " .section .hip_fatbin,\"a\",@progbits\n"; ObjStream << " .globl __hip_fatbin\n"; ObjStream << " .p2align " << llvm::Log2(llvm::Align(HIPCodeObjectAlign)) << "\n"; _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits