The problem of structures with identical names but conflicting members has
bitten dwarf2ctf before. We defined a deduplication blacklist which prevents
specific modules from participating in deduplication, because they define a
structure with the same name as one in the shared type repository but with
different members. This is, it turns out, not always enough.
Some kernel modules have begun to define structures with conflicting members in
different translation units within the same module. There is no trick we can
use to help dwarf2ctf deal with this: each module gets one CTF file, covering
all that module's translation units, and if types have conflicting definitions
within that one module, there's nothing we can do: we must skip them entirely.
But we can limit the damage somewhat.
This commit adds a new blacklist, the 'member blacklist', stored in
scripts/dwarf2ctf/member.blacklist, which blacklists structure or union members
by name. There are some limitations: only members of named structures and
unions can be blacklisted (not members of typedeffed, unnamed structures or
unions); and you can only blacklist types in the kernel tree, not types in
external modules. Both of these restrictions can be lifted if it ever becomes
necessary, the latter quite easily.
The blacklist is of the form
filename:structure name.member name
The filenames are absolutized and compared with the filenames in the DWARF for
each structure member, both at emission time and when recursing to mark shared
types.
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>