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

Alexey Moksyakov via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 05:05:37 PDT 2025


yavtuk wrote:

> > > I'd say it's more that this PR is still unfinished :)
> > > 
> > > * [[BOLT][AArch64] Add jump table support using .llvm_jump_table_info #132114](https://github.com/llvm/llvm-project/pull/132114)
> > > 
> > > Mystery solved then. Τhanks for being keen and trying it out! Would you mind if I go ahead and close #143709 ?
> > > BTW, @aaupov is the diff rendering properly here?
> > > 
> > > * https://github.com/llvm/llvm-project/pull/132114/files
> > > 
> > > When I pull that PR locally I see changes on 17 files, including JumpTable.cpp, but online I only see 7 changed files.
> > 
> > I agree with closing about #143709
> 
> thanks for your earlier comment!
> 
> based on the jump table support introduced in PR #132114.
> 
> As we noted, BOLT attempts to generate relocations for jump table entries, but currently there is no suitable relocation type for these entries on AArch64.
> 
> Since I’m still not very familiar with BOLT internals and ARM architecture specifics, I would like to seek more detailed guidance on how to properly improve or extend the implementation to handle this case.
> 
> Specifically:
> - Should we define a new AArch64 relocation type within BOLT for jump table entries?

No, we just need to emit entry as symbol which should be encoded according to JT pattern

> - Or is there an alternative approach recommended for jump tables using `.byte` offset entries without relocations?
> - Or are there any other best practices or existing mechanisms in BOLT that I might have overlooked?
> 
> I’m eager to learn and contribute to the fix once I better understand the recommended path forward.
> 
> Thank you very much for your advice and help!
> 


I implemented JT for aarch64 but for GCC, I will help you here, we have a holidaynow but on the next week I will try to resolve this complicated moment



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


More information about the llvm-commits mailing list