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

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 15:03:03 PDT 2024


MaskRay wrote:

While I'm not involved with BPF development, I favor using `PrivateGlobalPrefix = PrivateLabelPrefix = ".L"` like regular ELF targets.
This is better from an assembler's perspective: `.L` prevents name collision with user-defined symbols.
Object file formats that use `L` typically decorate regular symbols with `_` to avoid name collision, which causes uglier names.

If `.L` symbols in the symbol table are useful, I'd suggest that BPF targets enable the cc1 option `-save-temp-label` by default.


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


More information about the llvm-commits mailing list