[Bug default/33090] New: abidw ignores --suppressions
Dodji Seketeli
dodji@seketeli.org
Fri Jun 20 16:26:59 GMT 2025
Hello,
First of all, thank you for the time and effort for reporting this
problem.
So, basically, if I summarize the issue, the suppression specification
below is "ignored" by abidw.
[suppress_function]
name = _private_func1
I think this is because the suppression specification should rather be:
[suppress_function]
name = _private_func1
drop = yes
The "drop = yes" is to tell libabigail to "drop" the representation of
the function from the internal representation (IR) of the ABI.
A tool like abidiff has basically two options to handle suppression
specifications:
1/ Either drop a type or a declaration from the IR of the ABI (aka AIR)
, entirely. This decision is taken at AIR building time, at the level
of the DWARF/BTF/CTF front-end.
2/ Or keep the AIR of the two binaries being compared, compute another
IR representing the graph of ABI changes between the two IRs (called a
Diff IR, aka DIR) and apply the suppression specifications when walking
the DIR for the purpose of categorizing the nodes. Once a node of the
DIR graph is categorized as being "suppressed", the reporting pass
avoids emitting a change report for the ABI change carried by that DIR
node.
These two choices are explained in the documentation at
https://sourceware.org/libabigail/manual/suppression-specifications.html#modus-operandi.
1/ is "early suppression mode" and 2/ is "late suppression mode".
Choosing 2/ over 1/ is made by adding the "drop = yes" property to a
given suppression specification statement like what I did above.
You can see this by looking for "drop" in the documentation above.
abidw however has no other choice but 1/ because no DIR graph is
involved when just serializing the AIR into ABIXML, yet the choice is
still left to the user (drop = yes).
Also, by default, libabigail favors not suppressing meaningful nodes
from the AIR graph unless users specifically ask for it through, e.g,
suppression specifications. That is why the mode used by default is the
late suppression one.
The documentation is not clear about this at all. For instance, the
documentation does not mention that suppression specifications in late
suppression mode won't work with abidw. So we should fix that.
I find it dangerous to make abidw operate suppression specifications in
early suppression mode by default as that might make users lose
information without being aware of it.
In any case, I am open to suggestions.
What do you think?
--
Dodji
More information about the Libabigail
mailing list