Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pahole: Do --lang_exclude CU filtering earlier
With this, we can avoid warnings for unsupported DWARF tags like: die__process_function: tag not supported 0x2f (template_type_parameter)! when processing object files generated from languages such as Rust, for instance when building the Linux kernel with `CONFIG_RUST`, after applying the next patch in this series. As an added bonus, this should speed up processing of large objects with filtered CUs, as their details will no longer be walked. Committer testing: Tested building a kernel with CONFIG_RUST, no warnings (that template_type_param wouldn't appear anyway as I added initial support for it, at least for creating some structs out of its DWARF info, so no more warnings), but: ⬢[acme@toolbox linux]$ pahole -C '<kernel::str::RawFormatter as core::fmt::Write>::{vtable_type}' ../build/rust-kernel/rust/kernel.o die__process_class: tag not supported 0x33 (variant_part) at <14f43>! struct <kernel::str::RawFormatter as core::fmt::Write>::{vtable_type} { () * drop_in_place __attribute__((__aligned__(8))); /* 0 8 */ usize size __attribute__((__aligned__(8))); /* 8 8 */ usize align __attribute__((__aligned__(8))); /* 16 8 */ () * __method3 __attribute__((__aligned__(8))); /* 24 8 */ () * __method4 __attribute__((__aligned__(8))); /* 32 8 */ () * __method5 __attribute__((__aligned__(8))); /* 40 8 */ /* size: 48, cachelines: 1, members: 6 */ /* forced alignments: 6 */ /* last cacheline: 48 bytes */ } __attribute__((__aligned__(8))); ⬢[acme@toolbox linux]$ That DW_TAG_variant_part warning would show up without this series, so seems to be working as expected :-) Reviewed-by: Alan Maguire <[email protected]> Signed-off-by: Matthew Maurer <[email protected]> Tested-by: Alan Maguire <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alice Ryhl <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
- Loading branch information