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
HasAggressiveSymbolFolding = true;
COMMDirectiveAlignmentIsInBytes = false;
HasNoDeadStrip = true;
- WeakRefDirective = ".weakref\t";
//===--- Dwarf Emission Directives -----------------------------------===//
SupportsDebugInformation = true;
DwarfRegNumForCFI = true;
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
; ASM: external_readonly:
; ASM: .long 0
; ASM: .size external_readonly, 4
+
+; ASM: .weak weak_global