[hip] Fix host object creation from fatbin

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

Differential Revision: https://reviews.llvm.org/D92418
This commit is contained in:
Michael Liao 2020-12-01 14:59:58 -05:00
parent 1f3def16f6
commit d8949a8ad3
1 changed files with 1 additions and 2 deletions

View File

@ -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";