dwarf_loader: Honour --lang_exclude when merging LTO built CUs
When building kernels with clang, thin-LTO, the Rust DWARF tags were
being added, which causes confusion as there has not been a concerted
effort to check if what is being generated is useful/valid.
At least the Rust DWARF tags, when converted to BTF, were not causing
crashes, which is a good signal.
Fix it by passing a 'struct cu' with all fields zeroed except for the
CU name and its language code. This is enough for the existing filter,
in pahole (cu__filter) and will also allow us to, in verbose mode, show
the CU names being filtered.
Reported-by: Tom Stellard <tstellar@redhat.com>
Cc: Alan Maguire <alan.maguire@oracle.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Josh Stone <jistone@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed