From: Matthias Maennich <maennich@google.com>
To: libabigail@sourceware.org
Cc: dodji@seketeli.org, gprocida@google.com, kernel-team@android.com,
maennich@google.com
Subject: [PATCH v2 0/8] Refactor dwarf-reader: split out ELF helpers
Date: Tue, 21 Apr 2020 08:35:43 +0200 [thread overview]
Message-ID: <20200421063551.222511-1-maennich@google.com> (raw)
In-Reply-To: <20200420110846.218792-1-maennich@google.com>
The abg-dwarf-reader.cc has grown into a large compilation unit with a lot of
responsibilities. This does not only affect the compilation time, but also
readability of the various implementation details. Hence it makes sense to
attempt a refactoring of parts of it.
To overcome the above and as a preparation for my future work on the symtab
reading part, this splits out functionality from the dwarf reader into a new
set of source files: src/elf-helpers.{h,cc} along with a test that so far only
serves the purpose of ensuring that the header file can be compiled on its own.
The elf-helpers, sensibly not named elf-utils, contain functionality like
looking up sections, converting values or deducting information and properties
in some way from an Elf* handle. They are not exposed to libabigail users as
they are an implementation detail of libabigail.
This set of changes is only a refactoring with minor cleanups and renames and
any change to the functionality would be unintentional.
Cheers,
Matthias
---
v2: Address Giuliano's comments. (Thanks!)
Mostly reworking the commit messages.
Matthias Maennich (8):
abg-dwarf-reader split: create abg-elf-helpers.{h,cc} and test case
abg-elf-helpers: move some elf helpers from abg-dwarf-reader
abg-elf-helpers: move some versioning helpers from abg-dwarf-reader
abg-elf-helpers: move some kernel helpers from abg-dwarf-reader
abg-elf-helpers: consolidate the is_linux_kernel* helpers
abg-dwarf-reader: migrate more ELF helpers to elf-helpers
abg-elf-helpers: migrate more elf helpers (architecture specific
helpers)
abg-elf-helpers: migrate maybe_adjust_et_rel_sym_addr_to_abs_addr
src/Makefile.am | 2 +
src/abg-dwarf-reader.cc | 1209 ++-----------------------------------
src/abg-elf-helpers.cc | 1031 +++++++++++++++++++++++++++++++
src/abg-elf-helpers.h | 183 ++++++
tests/.gitignore | 1 +
tests/Makefile.am | 6 +-
tests/test-elf-helpers.cc | 30 +
7 files changed, 1295 insertions(+), 1167 deletions(-)
create mode 100644 src/abg-elf-helpers.cc
create mode 100644 src/abg-elf-helpers.h
create mode 100644 tests/test-elf-helpers.cc
--
2.26.1.301.g55bc3eb7cb9-goog
next prev parent reply other threads:[~2020-04-21 6:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 11:08 [PATCH " Matthias Maennich
2020-04-20 11:08 ` [PATCH 1/8] abg-dwarf-reader split: create abg-elf-helpers.{h, cc} and test case Matthias Maennich
2020-04-20 15:35 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 2/8] abg-elf-helpers: move some elf helpers from abg-dwarf-reader Matthias Maennich
2020-04-20 15:34 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 3/8] abg-elf-helpers: move some versioning " Matthias Maennich
2020-04-20 15:33 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 4/8] abg-elf-helpers: move some kernel " Matthias Maennich
2020-04-20 14:32 ` Giuliano Procida
2020-04-20 15:30 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 5/8] abg-elf-helpers: consolidate the is_linux_kernel* helpers Matthias Maennich
2020-04-20 15:29 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 6/8] abg-dwarf-reader: migrate more ELF helpers to elf-helpers Matthias Maennich
2020-04-20 15:24 ` Giuliano Procida
2020-04-21 6:14 ` Matthias Maennich
2020-04-21 11:02 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 7/8] abg-elf-helpers: migrate more elf helpers (architecture specific helpers) Matthias Maennich
2020-04-20 15:25 ` Giuliano Procida
2020-04-20 11:08 ` [PATCH 8/8] abg-elf-helpers: migrate maybe_adjust_et_rel_sym_addr_to_abs_addr Matthias Maennich
2020-04-21 6:35 ` Matthias Maennich [this message]
2020-04-21 6:35 ` [PATCH v2 1/8] abg-dwarf-reader split: create abg-elf-helpers.{h, cc} and test case Matthias Maennich
2020-04-22 9:42 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 2/8] abg-elf-helpers: move some elf helpers from abg-dwarf-reader Matthias Maennich
2020-04-22 9:44 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 3/8] abg-elf-helpers: move some versioning " Matthias Maennich
2020-04-22 9:46 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 4/8] abg-elf-helpers: move some kernel " Matthias Maennich
2020-04-22 9:47 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 5/8] abg-elf-helpers: consolidate the is_linux_kernel* helpers Matthias Maennich
2020-04-22 9:48 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 6/8] abg-dwarf-reader: migrate more ELF helpers to elf-helpers Matthias Maennich
2020-04-22 9:53 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 7/8] abg-elf-helpers: migrate more elf helpers (architecture specific helpers) Matthias Maennich
2020-04-22 9:55 ` Dodji Seketeli
2020-04-21 6:35 ` [PATCH v2 8/8] abg-elf-helpers: migrate maybe_adjust_et_rel_sym_addr_to_abs_addr Matthias Maennich
2020-04-22 9:56 ` Dodji Seketeli
2020-04-22 9:57 ` [PATCH v2 0/8] Refactor dwarf-reader: split out ELF helpers Dodji Seketeli
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=20200421063551.222511-1-maennich@google.com \
--to=maennich@google.com \
--cc=dodji@seketeli.org \
--cc=gprocida@google.com \
--cc=kernel-team@android.com \
--cc=libabigail@sourceware.org \
/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).