On Mon, Aug 31, 2020 at 12:03 PM Ian <icampb...@gmail.com> wrote:
>
> Interestingly enough adding just -g in my Makefile built the BPF programs and 
> allowed the BTF section to be found and properly loaded. My BPF program was 
> loaded and is running properly with my desired functionality. I am confused 
> though as to why the -g flag fixed this problem. Which according to the clang 
> man page:
>
> -g Generate debug information.
>
> Is BTF information considered debug information? Is that in general or in 
> this case? Is the this unexpected behavior? Perhaps a bug of clangs non -g 
> compiled binaries with BPF? It would seem to me that the BTF information 
> should not be purged from a non -g binary. I am interested to hear your 
> thought on this Andrii!
>

It's expected right now. BTF started out as purely debug information,
but got elevated into pretty much a mandatory thing for modern BPF
applications. We've talked about making .BTF emitted without -g, but
that hasn't happened in Clang yet (there are some technical
difficulties).

> Again, thank you so much for your help. There is no way I would have figured 
> that out on my own.
>
> Ian
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1909): https://lists.iovisor.org/g/iovisor-dev/message/1909
Mute This Topic: https://lists.iovisor.org/mt/76194102/21656
Group Owner: iovisor-dev+ow...@lists.iovisor.org
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to