Re: BTF without DWARF
Matheus Castanho <[email protected]> Thu, 18 Jul 2024 09:37:37 -0300
| Newsgroups | org.kernel.vger.xdp-newbies |
|---|---|
| Message-ID | <[email protected]> |
Em 18 de julho de 2024 08:07:16 BRT, Srivats P <pstavirs@gmail=2Ecom> escr= eveu: >Hi, > >I'm updating my AF_XDP app from using a very old libbpf v0=2E1=2E1 to >libxdp v1=2E2=2E0 (the last libxdp version that supported clang/llvm 10 >included in Ubuntu 20=2E04)=2E > >I've changed my XDP program =2Ec code to use BTF maps as required=2E >However, it looks like to generate them I need to add '-g' to clang >which includes generic DWARF debug info as well=2E > >Is there a way to generate just the BTF info without dwarf while >compiling the XDP ebpf program =2Ec code? > >Thanks in advance, >Srivats > > After compiling your binary with 'clang -g' try=20 running the =2Eo through llvm-strip -g llvm-strip -g your-bpf-file=2Eo