forked from OSchip/llvm-project
[AMDGPU] Corrected directive to use for ELF weak refs
WeakRefDirective should specify a directive to declare "a global as being a weak undefined symbol". The directive used by AMDGPU was incorrect - ".weakref" was intended for other purposes. The correct directive is ".weak" and it is already defined as default for ELF. So the redefinition was removed. Reviewers: arsenm, rampitec Differential Revision: https://reviews.llvm.org/D87762
This commit is contained in:
parent
f0546173fa
commit
06d058afec
|
@ -40,7 +40,6 @@ AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(const Triple &TT,
|
|||
HasAggressiveSymbolFolding = true;
|
||||
COMMDirectiveAlignmentIsInBytes = false;
|
||||
HasNoDeadStrip = true;
|
||||
WeakRefDirective = ".weakref\t";
|
||||
//===--- Dwarf Emission Directives -----------------------------------===//
|
||||
SupportsDebugInformation = true;
|
||||
DwarfRegNumForCFI = true;
|
||||
|
|
|
@ -13,6 +13,8 @@ define amdgpu_kernel void @test() {
|
|||
ret void
|
||||
}
|
||||
|
||||
@weak_global = extern_weak addrspace(1) global i32
|
||||
|
||||
; ASM: .type linkonce_odr_global_program,@object
|
||||
; ASM: .section .bss,#alloc,#write
|
||||
; ASM: .weak linkonce_odr_global_program
|
||||
|
@ -48,3 +50,5 @@ define amdgpu_kernel void @test() {
|
|||
; ASM: external_readonly:
|
||||
; ASM: .long 0
|
||||
; ASM: .size external_readonly, 4
|
||||
|
||||
; ASM: .weak weak_global
|
||||
|
|
Loading…
Reference in New Issue