[llvm] [BPF] Support Jump Table (PR #149715)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 23 23:57:23 PDT 2025


yonghong-song wrote:

> > But the question remains, @aspsk , do we need relocations in the `.jumptables` section for libbpf linker?
> 
> So far, I don't see that we do need them @eddyz87

Regardless whether we will need it or not, thanks @eddyz87 for the work. Previously without any implementation I looked at asm code and find for each file we have:
    file "test4.c"
    .text
    .globl foo1
    ... <code, jump table sections, etc.>
    .text
    .globl foo2
    ... <code, jump tables sections, etc.>
  I thought that inside each function, we might get the address for '.text' in the beginning of that function.
  Looks like this is not correct. We can certainly get an address at the beginning of merged section.
  I will look at Eduard's patch tomorrow.

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


More information about the llvm-commits mailing list