|
|
Subscribe / Log in / New account

Building header files into the kernel

Building header files into the kernel

Posted Mar 26, 2019 23:46 UTC (Tue) by jsmith45 (guest, #125263)
In reply to: Building header files into the kernel by adirat
Parent article: Building header files into the kernel

Sure, with the right flags you can get macro definitions in the DWARF data, and extract them. But apparently compiling the kernel even with the normal debug flags can cause compilation to be quite a bit slower, and generate an enormous amount of data, and this would need even more data.

And parsing out the correct set of macros from that debug info may not be entirely trivial. (Some macros may have multiple values in different spots in the kernel.) Even if those issues were solved, and we had the macro data to combine with BTF it is not equivalent to headers. One thing that does not get captured is inline functions defined in the headers. I've no idea if those ever get used in BPF programs, but I could certainly imagine that at least some of them may work (e.g. if they are just abstracting over a struct access). And those are impossible to extract from any form of debugging information.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds