[llvm] [bolt][aarch64] Add R_AARCH64_P32_ABS16/32 relocations (PR #143773)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 03:07:59 PDT 2025


whubeibei wrote:

> @yavtuk, @whubeibei okay, just to clarify, these relocations aren't present in the input binary, but generated by mistake as the below code is not guarded for AArch64?
> 
> https://github.com/llvm/llvm-project/blob/d49a2b5128ec798990d9b542aac0562fb83f1317/bolt/lib/Core/JumpTable.cpp#L86-L91
> 
> And this happens only because the encoding of X86:
> 
> https://github.com/llvm/llvm-project/blob/ab4e06667dbd777f32061ac3fff69328dc787fce/llvm/include/llvm/BinaryFormat/ELFRelocs/x86_64.def#L7-L8
> 
> happens to map on these on AArch64 relocations?
> 
> https://github.com/llvm/llvm-project/blob/a9ad9e27caba2153b82fb3029694bfadaa5803cb/llvm/include/llvm/BinaryFormat/ELFRelocs/AArch64.def#L170-L171
> 
> If that is the case then maybe we don't need to proceed with this patch, at least not at this point.

yes,i think it's a mistake

https://github.com/llvm/llvm-project/pull/143773


More information about the llvm-commits mailing list