From: Giuliano Procida <gprocida@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, kernel-team@android.com, gprocida@google.com,
maennich@google.com, woodard@redhat.com
Subject: [RFC PATCH 0/9] Utility to manipulate ABI XML
Date: Thu, 25 Mar 2021 21:51:37 +0000 [thread overview]
Message-ID: <20210325215146.3597963-1-gprocida@google.com> (raw)
In-Reply-To: <20210316165509.2658452-1-gprocida@google.com>
Hi Dodji.
Following up from the script which would prune unreachable parts of
the ABI, I refactored this into more useful pieces and added a few
different processing passes.
Each pass performs a specific function.
* don't give anonymous types (differing) names
* duplicate (type id) detection and resolution
* one kind of duplicate (member-type fragments) looks easy to resolve
* there are at least two other kinds, probably IR / canonicalisation bugs
* duplicate (type name) resolution
* some opportunities for applying ODR for kernel code are being missed
* post-processing XML for fun and profit
* reachability analysis and ABI pruning
* symbol list filtering as an XML transformation
* stabilisation of type and declaration order within a corpus
The script serves as a vehicle for analysis and bug reporting - I've
already opened a few bugs and have a couple more pending - as well a
means of prototyping XML transformation via DOM manipulation. It's a
work in progress.
I've run this over every .xml and .abi in tests, followed by abidiff,
and the results are good with these caveats:
* the script finds conflicting definitions of type ids
* renaming anonymous types causes harmless diffs
* the XML reader gives anonymous types linkage names which triggered
an assertion in XML late canonicalisation
I hope this is interesting if not immediately useful.
Regards,
Giuliano.
Giuliano Procida (9):
Add ABI tidying utility
Add pass to drop empty XML elements
Add pass to prune unreachable parts of the ABI
Add pass to filter symbols
Add pass to normalise anonymous type names
Add pass to report duplicate type ids
Add pass to eliminate duplicate member-type fragments
Add pass to stabilise types and declarations
Add pass to resolve stray forward type declarations
scripts/abitidy.pl | 707 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 707 insertions(+)
create mode 100755 scripts/abitidy.pl
--
2.31.0.291.g576ba9dcdaf-goog
next prev parent reply other threads:[~2021-03-25 21:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 11:53 [RFC PATCH] Add an experimental ABI pruning utility Giuliano Procida
2021-03-11 20:39 ` Ben Woodard
2021-03-12 16:51 ` Giuliano Procida
2021-03-12 18:41 ` Ben Woodard
2021-03-15 11:08 ` Giuliano Procida
2021-03-12 16:59 ` [RFC PATCH v2] " Giuliano Procida
2021-03-16 16:55 ` [RFC PATCH v3] " Giuliano Procida
2021-03-25 21:51 ` Giuliano Procida [this message]
2021-03-25 21:51 ` [RFC PATCH 1/9] Add ABI tidying utility Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 2/9] Add pass to drop empty XML elements Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 3/9] Add pass to prune unreachable parts of the ABI Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 4/9] Add pass to filter symbols Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 5/9] Add pass to normalise anonymous type names Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 6/9] Add pass to report duplicate type ids Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 7/9] Add pass to eliminate duplicate member-type fragments Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 8/9] Add pass to stabilise types and declarations Giuliano Procida
2021-03-25 21:51 ` [RFC PATCH 9/9] Add pass to resolve stray forward type declarations Giuliano Procida
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210325215146.3597963-1-gprocida@google.com \
--to=gprocida@google.com \
--cc=dodji@seketeli.org \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
--cc=maennich@google.com \
--cc=woodard@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).