]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, samples: Add -fno-asynchronous-unwind-tables to BPF Clang invocation
authorToke Høiland-Jørgensen <toke@redhat.com>
Mon, 5 Jul 2021 10:38:41 +0000 (12:38 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 5 Jul 2021 19:56:30 +0000 (21:56 +0200)
commitd701b17bc4630814d3ed0a057ae18e888a57e71a
tree48356e321c2f3bd8f1aaf656b6ddf8d744910004
parent334aa6edabd95880609f109d5d7c7e87d864c1db
bpf, samples: Add -fno-asynchronous-unwind-tables to BPF Clang invocation

The samples/bpf Makefile currently compiles BPF files in a way that will
produce an .eh_frame section, which will in turn confuse libbpf and produce
errors when loading BPF programs, like:

  libbpf: elf: skipping unrecognized data section(32) .eh_frame
  libbpf: elf: skipping relo section(33) .rel.eh_frame for section(32) .eh_frame

Fix this by instruction Clang not to produce this section, as it's useless
for BPF anyway.

Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210705103841.180260-1-toke@redhat.com
samples/bpf/Makefile