libbpf: Accomodate DWARF/compiler bug with duplicated identical arrays
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 5 Nov 2020 04:33:59 +0000 (20:33 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 6 Nov 2020 02:37:30 +0000 (18:37 -0800)
commit6b6e6b1d09aa20c351a1fce0ea6402da436624a4
treece2216a56c34da099693b7162eb7bef8e1d3f8aa
parentf86524efcf9e3f3a7cf75ebcd82cf8f58ec716cc
libbpf: Accomodate DWARF/compiler bug with duplicated identical arrays

In some cases compiler seems to generate distinct DWARF types for identical
arrays within the same CU. That seems like a bug, but it's already out there
and breaks type graph equivalence checks, so accommodate it anyway by checking
for identical arrays, regardless of their type ID.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201105043402.2530976-10-andrii@kernel.org
tools/lib/bpf/btf.c