[llvm] [BPF] Use ".L" local prefix label for basic blocks (PR #95103)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 27 11:18:56 PDT 2024


MaskRay wrote:

> > > Okay, looks like current llvm19/llvm20 already do not have L* labels in symbol table. @eddyz87 has another pull request (#100550) to address llvm-objdump without-label issue. There are a couple of options to resolve this. Since we do not want L* in the symbol table, then the only option may be tweak llvm-objdump.
> > 
> > 
> > #100550 is for `llvm-objdump --symbolize-operands`, which creates fake labels for the disassembly output.
> > For this patch, I hope we use `.L` to be similar to other ELF architectures and not to create a special case:)
> 
> are you saying that if we use ".L" then private labels will automatically appear in disasm output and we don't need this extra flag? If so let's switch to ".L".

`llvm-objdump -d --symbolize-operands` is a way to improve readability of the disassembly, which doesn't need symbol table entries.
With that feature, basic block labels are likely less relevant.  In that case, we should favor more `.L` to match regular ELF targets.

There is a question whether `--symbolize-operands` should be the default for `llvm-objdump` BPF. While I don't favor that inconsistency, the discussion can be postponed to a difference place and not block the PR that switches to `.L`

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


More information about the llvm-commits mailing list