aya-rs / bpf-linker

Simple BPF static linker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strip away debug info not needed by BPF programs (and subprograms used by them)

vadorovsky opened this issue · comments

Currently, when we link bitcodes with debug info, even though we fix up it, we don't strip it. That produces a lot of unnecessary DI.

For example, if lto is not used, the debug info of core crate and other dependencies will end up in the BTF too. That makes the BTF relocations and program verification slower. It's also not correct by principle.

Context: https://discord.com/channels/855676609003651072/1026937450624450652/1133054554666180678