From 7d558faac47faee54c9b23ddde8519b2324b75db Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Fri, 19 Jul 2024 11:02:10 -0400 Subject: [PATCH] Fix examples according to latest compiler changes (#144) Addresses internal ticket - SWDEV-468634 Co-authored-by: Jaydeep Patel --- .../assembly_to_executable/hip_obj_gen.mcin | 24 +++++++++++-------- .../llvm_ir_to_executable/hip_obj_gen.mcin | 24 +++++++++++-------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/HIP-Basic/assembly_to_executable/hip_obj_gen.mcin b/HIP-Basic/assembly_to_executable/hip_obj_gen.mcin index 6b9fee5f3..77a7f3a52 100644 --- a/HIP-Basic/assembly_to_executable/hip_obj_gen.mcin +++ b/HIP-Basic/assembly_to_executable/hip_obj_gen.mcin @@ -9,13 +9,17 @@ # Input: Bundled Object file .hipfb file # Output: Host Bundled Object File .o - .type __hip_fatbin,@object - # Tell the assembler to place the offload bundle in the appropriate section. - .section .hip_fatbin,"a",@progbits - # Make the symbol that addresses the binary public. - .globl __hip_fatbin - # Give the bundle the required alignment of 4096 (2 ^ 12). - .p2align 12 -__hip_fatbin: - # Include the offload bundle. - .incbin "offload_bundle.hipfb" + .protected __hip_gpubin_handle_ + .type __hip_gpubin_handle_,@object + .section .hip_gpubin_handle,"aw" + .globl __hip_gpubin_handle_ + .p2align 12 +__hip_gpubin_handle_: + .zero 8 + + .type __hip_fatbin_,@object + .section .hip_fatbin,"a",@progbits + .globl __hip_fatbin_ + .p2align 12 +__hip_fatbin_: + .incbin "offload_bundle.hipfb" diff --git a/HIP-Basic/llvm_ir_to_executable/hip_obj_gen.mcin b/HIP-Basic/llvm_ir_to_executable/hip_obj_gen.mcin index 6b9fee5f3..77a7f3a52 100644 --- a/HIP-Basic/llvm_ir_to_executable/hip_obj_gen.mcin +++ b/HIP-Basic/llvm_ir_to_executable/hip_obj_gen.mcin @@ -9,13 +9,17 @@ # Input: Bundled Object file .hipfb file # Output: Host Bundled Object File .o - .type __hip_fatbin,@object - # Tell the assembler to place the offload bundle in the appropriate section. - .section .hip_fatbin,"a",@progbits - # Make the symbol that addresses the binary public. - .globl __hip_fatbin - # Give the bundle the required alignment of 4096 (2 ^ 12). - .p2align 12 -__hip_fatbin: - # Include the offload bundle. - .incbin "offload_bundle.hipfb" + .protected __hip_gpubin_handle_ + .type __hip_gpubin_handle_,@object + .section .hip_gpubin_handle,"aw" + .globl __hip_gpubin_handle_ + .p2align 12 +__hip_gpubin_handle_: + .zero 8 + + .type __hip_fatbin_,@object + .section .hip_fatbin,"a",@progbits + .globl __hip_fatbin_ + .p2align 12 +__hip_fatbin_: + .incbin "offload_bundle.hipfb"