codiff: Fix comparision of multi-cu against single-cu files
When the first arg, the old object file has multiple compile units, i.e.
multiple objects that were then linked into one, and the second just one
.o, or equivalent, i.e. a .BTF file, then codiff shouldn't try to
find the types in the single CU in each of the old CUs.
Think about a .BTF file generated from a multi-CU DWARF binary, it will
contain all the types in all of the DWARF CUs, so if we go on trying to
find all the BTF files in each of the CUs, we'll fail.
It only makes sense to go on the DWARF CUs looking for the type on the
.BTF section and then compare them.
Fixes: 6b1e43f2c1
("codiff: When comparing against a file with just one CU don't bother finding by name")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
f2641ce169
commit
ac32e5e908
3
codiff.c
3
codiff.c
|
@ -840,7 +840,8 @@ failure:
|
|||
cus__for_each_cu(old_cus, cu_diff_iterator, new_cus, NULL);
|
||||
cus__for_each_cu(new_cus, cu_find_new_tags_iterator, old_cus, NULL);
|
||||
cus__for_each_cu(old_cus, cu_show_diffs_iterator, NULL, NULL);
|
||||
cus__for_each_cu(new_cus, cu_show_diffs_iterator, (void *)1, NULL);
|
||||
if (new_cus->nr_entries > 1)
|
||||
cus__for_each_cu(new_cus, cu_show_diffs_iterator, (void *)1, NULL);
|
||||
|
||||
if (total_cus_changed > 1) {
|
||||
if (show_function_diffs)
|
||||
|
|
Loading…
Reference in New Issue