[llvm] [Bolt] fix a wrong relocation update issue with weak references (PR #69136)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 02:45:06 PST 2023
linsinan1995 wrote:
> Hi @linsinan1995 . May I ask in what what it might impact it? Does some linkers removes the symbol name? We're trying to avoid yaml tests. If it completely necessary we need to minimise yaml file (e.g. removing the symbols and sections that are not related to the test).
Hi,
I was unable to reproduce this issue in lld previously(fail to link), so as for the previous patch, I used the local ld linker for linking. However, this case cannot pass on the Windows aarch64 CI (most likely because the local linker is not ld), which is what I mentioned about the impact of the linker.
I spent some time learning why this happened, and finally found a way to reproduce it with lld ... (we need dynamic relocation and also func_1/2 symbol values live in .rodata)
> > I still use IsWeakReference, since weak reference is a term for such a case. Is it ok?
>
> Corrent me if I'm wrong but the weak reference doesn't always mean that the symbol is NULL. You're looking to the 2 parameters: weak and undefined, that is why I was asking to add both weak and und to the lambda name.
I think `weak reference` equals `weak undefined`. AArch64 ELF spec says:
https://github.com/llvm/llvm-project/pull/69136
More information about the llvm-commits
mailing list