summaryrefslogtreecommitdiff
path: root/libctf/ChangeLog
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2021-03-18 12:37:52 +0000
committerNick Alcock <nick.alcock@oracle.com>2021-03-18 12:37:55 +0000
commitb9a964318a73b9a8540c5c85ab7f3bea3d9d8db5 (patch)
treeb43db32ade45f17a1ea5e1713ede83bcf79e657b /libctf/ChangeLog
parent01cbfcba4bc74fb04904ad395a346549853bd189 (diff)
downloadbinutils-gdb-b9a964318a73b9a8540c5c85ab7f3bea3d9d8db5.tar.gz
libctf: split up ctf_serialize
ctf_serialize and its various pieces may be split out into a separate file now, but ctf_serialize is still far too long and disordered, mixing header initialization, sizing of multiple CTF sections, sorting and emission of multiple CTF sections, strtab construction and ctf_dict_t copying into a single ugly organically-grown mess. Fix the worst of this by migrating all section sizing and emission into separate functions, two per section (or class of section in the case of the symtypetabs). Only the variable section is now sized and emitted directly in ctf_serialize (because it only takes about three lines to do so). The section sizes themselves are still maintained by ctf_serialize so that it can work out the header offsets, but ctf_symtypetab_sect_sizes and ctf_emit_symtypetab_sects share a lot of extra state: migrate that into a shared structure, emit_symtypetab_state_t. (Test results unchanged.) libctf/ChangeLog 2021-03-18 Nick Alcock <nick.alcock@oracle.com> * ctf-serialize.c: General reshuffling, and... (emit_symtypetab_state_t): New, migrated from local variables in ctf_serialize. (ctf_serialize): Split out most section sizing and emission. (ctf_symtypetab_sect_sizes): New (split out). (ctf_emit_symtypetab_sects): Likewise. (ctf_type_sect_size): Likewise. (ctf_emit_type_sect): Likewise.
Diffstat (limited to 'libctf/ChangeLog')
-rw-r--r--libctf/ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 58c0ed434ff..4e4e9af0686 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,17 @@
2021-03-18 Nick Alcock <nick.alcock@oracle.com>
+ * ctf-serialize.c: General reshuffling, and...
+ (emit_symtypetab_state_t): New, migrated from
+ local variables in ctf_serialize.
+ (ctf_serialize): Split out most section sizing and
+ emission.
+ (ctf_symtypetab_sect_sizes): New (split out).
+ (ctf_emit_symtypetab_sects): Likewise.
+ (ctf_type_sect_size): Likewise.
+ (ctf_emit_type_sect): Likewise.
+
+2021-03-18 Nick Alcock <nick.alcock@oracle.com>
+
* ctf-impl.h (ctf_dict_t): Fix comment.
2021-03-18 Nick Alcock <nick.alcock@oracle.com>