public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/16] libctf: mostly cleanups and refactoring
@ 2021-03-06  0:40 Nick Alcock
  2021-03-06  0:40 ` [PATCH 01/16] libctf: fix some tabdamage and move some code around Nick Alcock
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Nick Alcock @ 2021-03-06  0:40 UTC (permalink / raw)
  To: binutils

This series is mostly cleanups and refactoring in preparation for the
changes that will go into CTFv4, splitting serialization and dict writeout
into its own file and refactoring the representation of types in writable
dicts to use the same representation as used in written-out CTF dicts, and
to expand all CTF representations into their largest form for in-memory
processing, and to shrink them down to their smallest possible form only at
serialization time, so that code creating and querying types only needs to
handle one representation (the largest form used in written-out CTF dicts)
rather than three (the large form, the small form, and a form used only by
writable dicts).  This will make it practical to add more compact
representations in v4.

There are also a couple of bugfixes, highly unlikely to be visible in any
current use case, since they mostly relate either to error-handling or to
writing out a dict and then doing something else with it, something the
linker does not do and neither will users who merely consume .ctf sections
produced by the linker.

Jammed in the middle is one top-level possible fix for bug 27482, which
might need review as it is top-level. (The reporter has not yet confirmed
that this fixes his bug, either, but it might!)

The usual great big pile of tests passed (including, now, just over a
thousand Gentoo packages successfully built with nary a CTF-related linker
warning).

Nick Alcock (16):
  libctf: fix some tabdamage and move some code around
  libctf: split serialization and file writeout into its own file
  libctf: fix comment above ctf_dict_t
  libctf: split up ctf_serialize
  libctf: fix GNU style for do {} while
  libctf: eliminate dtd_u, part 1: int/float/slice
  libctf: eliminate dtd_u, part 2: arrays
  libctf: eliminate dtd_u, part 3: functions
  Add install dependencies for ld -> bfd and libctf -> bfd
  libctf: don't lose track of all valid types upon serialization
  libctf: do not corrupt strings across ctf_serialize
  libctf: eliminate dtd_u, part 4: enums
  libctf: eliminate dtd_u, part 5: structs / unions
  libctf: types: unify code dealing with small-vs-large struct members
  libctf: a couple of small error-handling fixes
  libctf: support encodings for enums

 Makefile.def                                  |    6 +-
 Makefile.in                                   |    4 +-
 ld/testsuite/ld-ctf/slice.c                   |    3 +
 ld/testsuite/ld-ctf/slice.d                   |    4 +-
 libctf/Makefile.am                            |    4 +-
 libctf/Makefile.in                            |   44 +-
 libctf/ctf-archive.c                          |    3 +-
 libctf/ctf-create.c                           | 1893 +++--------------
 libctf/ctf-dedup.c                            |   90 +-
 libctf/ctf-dump.c                             |    8 +-
 libctf/ctf-hash.c                             |    6 +
 libctf/ctf-impl.h                             |   42 +-
 libctf/ctf-link.c                             |   92 +-
 libctf/ctf-lookup.c                           |   15 +-
 libctf/ctf-open.c                             |    7 +-
 libctf/ctf-serialize.c                        | 1419 ++++++++++++
 libctf/ctf-string.c                           |   78 +-
 libctf/ctf-types.c                            |  540 ++---
 libctf/swap.h                                 |   24 +-
 .../testsuite/libctf-lookup/enum-many-ctf.c   |   10 +
 libctf/testsuite/libctf-lookup/enum-many.lk   |  101 +
 .../libctf-lookup/struct-iteration.c          |    6 +-
 .../type-add-unnamed-struct-ctf.c             |    1 +
 .../type-add-unnamed-struct.c                 |    4 +-
 .../type-add-unnamed-struct.lk                |    1 +
 .../reserialize-strtab-corruption.c           |   91 +
 .../reserialize-strtab-corruption.lk          |    5 +
 28 files changed, 2414 insertions(+), 2095 deletions(-)
 create mode 100644 libctf/ctf-serialize.c
 create mode 100644 libctf/testsuite/libctf-lookup/enum-many-ctf.c
 create mode 100644 libctf/testsuite/libctf-lookup/enum-many.lk
 create mode 100644 libctf/testsuite/libctf-writable/reserialize-strtab-corruption.c
 create mode 100644 libctf/testsuite/libctf-writable/reserialize-strtab-corruption.lk

-- 
2.30.0.252.gc27e85e57d


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2021-03-19  1:24 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06  0:40 [PATCH 00/16] libctf: mostly cleanups and refactoring Nick Alcock
2021-03-06  0:40 ` [PATCH 01/16] libctf: fix some tabdamage and move some code around Nick Alcock
2021-03-06  0:40 ` [PATCH 02/16] libctf: split serialization and file writeout into its own file Nick Alcock
2021-03-06  0:40 ` [PATCH 03/16] libctf: fix comment above ctf_dict_t Nick Alcock
2021-03-06  0:40 ` [PATCH 04/16] libctf: split up ctf_serialize Nick Alcock
2021-03-06  0:40 ` [PATCH 05/16] libctf: fix GNU style for do {} while Nick Alcock
2021-03-06  0:40 ` [PATCH 06/16] libctf: eliminate dtd_u, part 1: int/float/slice Nick Alcock
2021-03-06  0:40 ` [PATCH 07/16] libctf: eliminate dtd_u, part 2: arrays Nick Alcock
2021-03-06  0:40 ` [PATCH 08/16] libctf: eliminate dtd_u, part 3: functions Nick Alcock
2021-03-06  0:40 ` [PATCH 09/16] Add install dependencies for ld -> bfd and libctf -> bfd Nick Alcock
2021-03-15 13:11   ` [PING] " Nick Alcock
2021-03-17 14:23     ` Nick Alcock
2021-03-17 18:34       ` [PATCH v2 " Nick Alcock
2021-03-18  9:25         ` Alan Modra
2021-03-18 12:30           ` Nick Alcock
2021-03-19  1:24             ` Alan Modra
2021-03-06  0:40 ` [PATCH 10/16] libctf: don't lose track of all valid types upon serialization Nick Alcock
2021-03-06  0:40 ` [PATCH 11/16] libctf: do not corrupt strings across ctf_serialize Nick Alcock
2021-03-06  0:40 ` [PATCH 12/16] libctf: eliminate dtd_u, part 4: enums Nick Alcock
2021-03-06  0:40 ` [PATCH 13/16] libctf: eliminate dtd_u, part 5: structs / unions Nick Alcock
2021-03-06  0:40 ` [PATCH 14/16] libctf: types: unify code dealing with small-vs-large struct members Nick Alcock
2021-03-06  0:40 ` [PATCH 15/16] libctf: a couple of small error-handling fixes Nick Alcock
2021-03-06  0:40 ` [PATCH 16/16] libctf: support encodings for enums Nick Alcock

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).