aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-diff/lib/DiffLog.h
diff options
context:
space:
mode:
authoryonghong-song <yhs@fb.com>2025-11-03 11:11:47 -0800
committerGitHub <noreply@github.com>2025-11-03 11:11:47 -0800
commit8fd1bf2f8c9e6e7c4bc5f6915a9d52bb3672601b (patch)
tree5b089cdee2d2e4df7178533eb9608123723aac8d /llvm/tools/llvm-diff/lib/DiffLog.h
parentd200df0557b71fae0d77bc7fc1650d22a05af371 (diff)
downloadllvm-8fd1bf2f8c9e6e7c4bc5f6915a9d52bb3672601b.zip
llvm-8fd1bf2f8c9e6e7c4bc5f6915a9d52bb3672601b.tar.gz
llvm-8fd1bf2f8c9e6e7c4bc5f6915a9d52bb3672601b.tar.bz2
[BPF] Remove unused weak symbol __bpf_trap (#166003)
Nikita Popov reported an issue ([1]) where a dangling weak symbol __bpf_trap is in the final binary and this caused libbpf failing like below: $ veristat -v ./t.o Processing 't.o'... libbpf: elf: skipping unrecognized data section(4) .eh_frame libbpf: elf: skipping relo section(5) .rel.eh_frame for section(4) .eh_frame libbpf: failed to find BTF for extern '__bpf_trap': -3 Failed to open './t.o': -3 In llvm, the dag selection phase generates __bpf_trap in code. Later the UnreachableBlockElim pass removed __bpf_trap from the code, but __bpf_trap symbol survives in the symbol table. Having a dangling __bpf_trap weak symbol is not good for old kernels as seen in the above veristat failure. Although users could use compiler flag `-mllvm -bpf-disable-trap-unreachable` to workaround the issue, this patch fixed the issue by removing the dangling __bpf_trap. [1] https://github.com/llvm/llvm-project/issues/165696
Diffstat (limited to 'llvm/tools/llvm-diff/lib/DiffLog.h')
0 files changed, 0 insertions, 0 deletions