pahole: Consider type members's types when comparing unions, structs
But this still doesn't cover all types in the kernel, at least not for
btfdiff's needs, which is to have the output of pahole for BTF and DWARF
to be the same, so if we have two types that are ABI equal, it will
still complain if...
$ btfdiff vmlinux
--- /tmp/btfdiff.dwarf.VUXlsB 2021-08-06 18:11:51.371012024 -0300
+++ /tmp/btfdiff.btf.CeZ7hA 2021-08-06 18:11:51.604017029 -0300
@@ -48226,8 +48226,8 @@ struct intel_ir_data {
/* last cacheline: 56 bytes */
};
struct intel_pad_context {
- u32 padctrl0; /* 0 4 */
- u32 padctrl1; /* 4 4 */
+ u32 conf0; /* 0 4 */
+ u32 val; /* 4 4 */
/* size: 8, cachelines: 1, members: 2 */
/* last cacheline: 8 bytes */
$
The name of some members are different :-\ Consider it in the next
patch and possibly add a knob to consider both types equal, i.e. don't
compare member names, just size, number of members and types of pairs of
members (at each offset in both types).
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed