Home | History | Annotate | Line # | Download | only in libctf
      1 2025-07-13  Nick Clifton  <nickc (a] redhat.com>
      2 
      3 	* 2.45 Branch point.
      4 
      5 2025-01-19  Nick Clifton  <nickc (a] redhat.com>
      6 
      7 	* 2.44 Branch point.
      8 
      9 2024-07-20  Nick Clifton  <nickc (a] redhat.com>
     10 
     11 	* 2.43 branch point.
     12 
     13 2024-01-15  Nick Clifton  <nickc (a] redhat.com>
     14 
     15 	* 2.42 branch point.
     16 
     17 2023-11-15  Arsen Arsenovi  <arsen (a] aarsen.me>
     18 
     19 	* Makefile.am (SUBDIRS): Define to empty to suppress a check in
     20 	Automake.
     21 	* Makefile.in: Regenerate.
     22 	* configure.ac (CTF_LIBADD): Use LTLIBINTL rather than LIBINTL.
     23 	* aclocal.m4: Regenerate.
     24 	* configure: Regenerate.
     25 
     26 2023-07-03  Nick Clifton  <nickc (a] redhat.com>
     27 
     28 	2.41 Branch Point.
     29 
     30 2022-12-31  Nick Clifton  <nickc (a] redhat.com>
     31 
     32 	* 2.40 branch created.
     33 
     34 2022-07-08  Nick Clifton  <nickc (a] redhat.com>
     35 
     36 	* 2.39 branch created.
     37 
     38 2022-01-22  Nick Clifton  <nickc (a] redhat.com>
     39 
     40 	* 2.38 release branch created.
     41 
     42 2021-11-08  Nick Alcock  <nick.alcock (a] oracle.com>
     43 
     44 	* doc/ctf-spec.texi: New file.
     45 	* configure.ac (MAKEINFO): Add.
     46 	(BUILD_INFO): Likewise.
     47 	(AC_CONFIG_FILES) [doc/Makefile]: Add.
     48 	* Makefile.am [BUILD_INFO] (SUBDIRS): Add doc/.
     49 	* doc/Makefile.am: New file.
     50 	* doc/Makefile.in: Likewise.
     51 	* configure: Regenerated.
     52 	* Makefile.in: Likewise.
     53 
     54 2021-10-25  Nick Alcock  <nick.alcock (a] oracle.com>
     55 
     56 	* ctf-types.c (ctf_type_rvisit): Handle nonrepresentable types.
     57 
     58 2021-10-25  Nick Alcock  <nick.alcock (a] oracle.com>
     59 
     60 	* ctf-dump.c (ctf_dump_type): Do not abort on error.
     61 
     62 2021-09-27  Nick Alcock  <nick.alcock (a] oracle.com>
     63 
     64 	* ctf-lookup.c (ctf_lookup_by_name_internal): Fix pptrtab bounds.
     65 	* testsuite/libctf-writable/pptrtab-writable-page-deep-lookup.*:
     66 	New test.
     67 
     68 2021-09-27  Nick Alcock  <nick.alcock (a] oracle.com>
     69 
     70 	* testsuite/libctf-lookup/enum-symbol.c: Remove unused label.
     71 	* testsuite/libctf-lookup/conflicting-type-syms.c: Remove unused
     72 	variables.
     73 	* testsuite/libctf-regression/pptrtab.c: Likewise.
     74 	* testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
     75 	* testsuite/libctf-writable/pptrtab.c: Likewise.
     76 	* testsuite/libctf-writable/reserialize-strtab-corruption.c:
     77 	Likewise.
     78 	* testsuite/libctf-regression/nonstatic-var-section-ld-r.c: Fix
     79 	format string.
     80 	* testsuite/libctf-regression/nonstatic-var-section-ld.c:
     81 	Likewise.
     82 	* testsuite/libctf-regression/nonstatic-var-section-ld.lk: Adjust.
     83 	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Fix
     84 	initializer.
     85 
     86 2021-09-27  Nick Alcock  <nick.alcock (a] oracle.com>
     87 
     88 	* ctf-open.c (ctf_bufopen_internal): Don't complain about corrupt
     89 	function index symtypetab sections if this is an old-format
     90 	function symtypetab section (which should be ignored in any case).
     91 	Fix bad grammar.
     92 
     93 2021-09-27  Nick Alcock  <nick.alcock (a] oracle.com>
     94 
     95 	* configure: Regenerate.
     96 	* Makefile.in: Regenerate.
     97 
     98 2021-09-27  Nick Alcock  <nick.alcock (a] oracle.com>
     99 
    100 	PR libctf/27967
    101 	* configure.ac (VERSION_FLAGS): Replace with...
    102 	(ac_cv_libctf_version_script): ... this multiple test.
    103 	(VERSION_FLAGS_NOBFD): Substitute this too.
    104 	* Makefile.am (libctf_nobfd_la_LDFLAGS): Use it.  Split out...
    105 	(libctf_ldflags_nover): ... non-versioning flags here.
    106 	(libctf_la_LDFLAGS): Use it.
    107 	* libctf.ver: Give every symbol not in libctf-nobfd a comment on
    108 	the same line noting as much.
    109 
    110 2021-09-27  Nick Alcock  <nick.alcock (a] oracle.com>
    111 
    112 	PR libctf/27360
    113 	* Makefile.am (libctf_la_LIBADD): Link against libiberty
    114 	before pulling in libbfd.la or pulling in libctf-nobfd.la.
    115 	* Makefile.in: Regenerate.
    116 
    117 2021-07-03  Nick Clifton  <nickc (a] redhat.com>
    118 
    119 	* 2.37 release branch created.
    120 
    121 2021-05-09  Alan Modra  <amodra (a] gmail.com>
    122 
    123 	* ctf-impl.h (ctf_dynset_eq_string): Don't declare.
    124 	* ctf-hash.c (ctf_dynset_eq_string): Delete function.
    125 	* ctf-dedup.c (make_set_element): Use htab_eq_string.
    126 	(ctf_dedup_atoms_init, ADD_CITER, ctf_dedup_init): Likewise.
    127 	(ctf_dedup_conflictify_unshared): Likewise.
    128 	(ctf_dedup_walk_output_mapping): Likewise.
    129 
    130 2021-05-06  Nick Alcock  <nick.alcock (a] oracle.com>
    131 
    132 	* testsuite/lib/ctf-lib.exp: Use -gctf, not -gt.
    133 	* testsuite/libctf-regression/nonstatic-var-section-ld-r.lk:
    134 	Hidden symbols now get into the symtypetab anyway.
    135 
    136 2021-05-06  Nick Alcock  <nick.alcock (a] oracle.com>
    137 
    138 	* ctf-open.c (init_types): Unknown types may have names.
    139 	* ctf-types.c (ctf_type_resolve): CTF_K_UNKNOWN is as
    140 	non-representable as type ID 0.
    141 	(ctf_type_aname): Print unknown types.
    142 	* ctf-dedup.c (ctf_dedup_hash_type): Do not early-exit for
    143 	CTF_K_UNKNOWN types: they have real hash values now.
    144 	(ctf_dedup_rwalk_one_output_mapping): Treat CTF_K_UNKNOWN types
    145 	like other types with no referents: call the callback and do not
    146 	skip them.
    147 	(ctf_dedup_emit_type): Emit via...
    148 	* ctf-create.c (ctf_add_unknown): ... this new function.
    149 	* libctf.ver (LIBCTF_1.2): Add it.
    150 
    151 2021-03-25  Nick Alcock  <nick.alcock (a] oracle.com>
    152 
    153 	* configure.ac: Check for dlsym, not dlopen.
    154 	* configure: Regenerate.
    155 
    156 2021-03-25  Nick Alcock  <nick.alcock (a] oracle.com>
    157 
    158 	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Don't
    159 	leak buf.
    160 
    161 2021-03-25  Nick Alcock  <nick.alcock (a] oracle.com>
    162 
    163 	PR libctf/27628
    164 	* ctf-lookup.c (isqualifier): Don't dereference out-of-bounds
    165 	qhash values.
    166 
    167 2021-03-25  Nick Alcock  <nick.alcock (a] oracle.com>
    168 
    169 	* ctf-open-bfd.c (ctf_bfdopen_ctfsect): Initialize debugging.
    170 
    171 2021-03-25  Nick Alcock  <nick.alcock (a] oracle.com>
    172 
    173 	PR libctf/27628
    174 	* ctf-serialize.c (ctf_emit_type_sect): Allow for a NULL vlen in
    175 	CTF_K_FUNCTION types.
    176 
    177 2021-03-25  Nick Alcock  <nick.alcock (a] oracle.com>
    178 
    179 	* ctf-dump.c (ctf_dump_format_type): Don't emit size or alignment
    180 	on error.
    181 
    182 2021-03-21  Alan Modra  <amodra (a] gmail.com>
    183 
    184 	* ctf-impl.h: Include string.h.
    185 
    186 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    187 
    188 	* ctf-types.c (ctf_type_encoding): Support, after a fashion, for enums.
    189 	* ctf-dump.c (ctf_dump_format_type): Do not report enums' degenerate
    190 	encoding.
    191 
    192 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    193 
    194 	* ctf-dedup.c (ctf_dedup_rhash_type): Report errors on the input
    195 	dict properly.
    196 	* ctf-open.c (ctf_bufopen_internal): Report errors initializing
    197 	the atoms table.
    198 
    199 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    200 
    201 	* ctf-impl.h (ctf_next_t) <ctn_tp>: New.
    202 	<u.ctn_mp>: Remove.
    203 	<u.ctn_lmp>: Remove.
    204 	<u.ctn_vlen>: New.
    205 	* ctf-types.c (ctf_struct_member): New.
    206 	(ctf_member_next): Use it, dropping separate large/small code paths.
    207 	(ctf_type_align): Likewise.
    208 	(ctf_member_info): Likewise.
    209 	(ctf_type_rvisit): Likewise.
    210 
    211 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    212 
    213 	* ctf-impl.h (ctf_dtdef_t) <dtu_members>: Remove.
    214 	<dtd_u>: Likewise.
    215 	(ctf_dmdef_t): Remove.
    216 	(struct ctf_next) <u.ctn_dmd>: Remove.
    217 	* ctf-create.c (INITIAL_VLEN): New, more-or-less arbitrary initial
    218 	vlen size.
    219 	(ctf_add_enum): Use it.
    220 	(ctf_dtd_delete): Do not free the (removed) dmd; remove string
    221 	refs from the vlen on struct deletion.
    222 	(ctf_add_struct_sized): Populate the vlen: do it by hand if
    223 	promoting forwards.  Always populate the full-size
    224 	lsizehi/lsizelo members.
    225 	(ctf_add_union_sized): Likewise.
    226 	(ctf_add_member_offset): Set up the vlen rather than the dmd.
    227 	Expand it as needed, repointing string refs via
    228 	ctf_str_move_pending. Add the member names as pending strings.
    229 	Always populate the full-size lsizehi/lsizelo members.
    230 	(membadd): Remove, folding back into...
    231 	(ctf_add_type_internal): ... here, adding via an ordinary
    232 	ctf_add_struct_sized and _next iteration rather than doing
    233 	everything by hand.
    234 	* ctf-serialize.c (ctf_copy_smembers): Remove this...
    235 	(ctf_copy_lmembers): ... and this...
    236 	(ctf_emit_type_sect): ... folding into here. Figure out if a
    237 	ctf_stype_t is needed here, not in ctf_add_*_sized.
    238 	(ctf_type_sect_size): Figure out the ctf_stype_t stuff the same
    239 	way here.
    240 	* ctf-types.c (ctf_member_next): Remove the dmd path and always
    241 	use the vlen.  Force large-structure usage for dynamic types.
    242 	(ctf_type_align): Likewise.
    243 	(ctf_member_info): Likewise.
    244 	(ctf_type_rvisit): Likewise.
    245 	* testsuite/libctf-regression/type-add-unnamed-struct-ctf.c: Add a
    246 	self-referential type to this test.
    247 	* testsuite/libctf-regression/type-add-unnamed-struct.c: Adjusted
    248 	accordingly.
    249 	* testsuite/libctf-regression/type-add-unnamed-struct.lk: Likewise.
    250 
    251 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    252 
    253 	* ctf-impl.h (ctf_dtdef_t) <dtd_vlen_alloc>: New.
    254 	(ctf_str_move_pending): Declare.
    255 	* ctf-string.c (ctf_str_add_ref_internal): Fix error return.
    256 	(ctf_str_move_pending): New.
    257 	* ctf-create.c (ctf_grow_vlen): New.
    258 	(ctf_dtd_delete): Zero out the vlen_alloc after free.  Free the
    259 	vlen later: iterate over it and free enum name refs first.
    260 	(ctf_add_generic): Populate dtd_vlen_alloc from vlen.
    261 	(ctf_add_enum): populate the vlen; do it by hand if promoting
    262 	forwards.
    263 	(ctf_add_enumerator): Set up the vlen rather than the dmd.  Expand
    264 	it as needed, repointing string refs via ctf_str_move_pending. Add
    265 	the enumerand names as pending strings.
    266 	* ctf-serialize.c (ctf_copy_emembers): Remove.
    267 	(ctf_emit_type_sect): Copy the vlen into place and ref the
    268 	strings.
    269 	* ctf-types.c (ctf_enum_next): The dynamic portion now uses
    270 	the same code as the non-dynamic.
    271 	(ctf_enum_name): Likewise.
    272 	(ctf_enum_value): Likewise.
    273 	* testsuite/libctf-lookup/enum-many-ctf.c: New test.
    274 	* testsuite/libctf-lookup/enum-many.lk: New test.
    275 
    276 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    277 
    278 	* ctf-hash.c (ctf_dynset_elements): New.
    279 	* ctf-impl.h (ctf_dynset_elements): Declare it.
    280 	(ctf_str_add_pending): Likewise.
    281 	(ctf_dict_t) <ctf_str_pending_ref>: New, set of refs that must be
    282 	added during serialization.
    283 	* ctf-string.c (ctf_str_create_atoms): Initialize it.
    284 	(CTF_STR_ADD_REF): New flag.
    285 	(CTF_STR_MAKE_PROVISIONAL): Likewise.
    286 	(CTF_STR_PENDING_REF): Likewise.
    287 	(ctf_str_add_ref_internal): Take a flags word rather than int
    288 	params.  Populate, and clear out, ctf_str_pending_ref.
    289 	(ctf_str_add): Adjust accordingly.
    290 	(ctf_str_add_external): Likewise.
    291 	(ctf_str_add_pending): New.
    292 	(ctf_str_remove_ref): Also remove the potential ref if it is a
    293 	pending ref.
    294 	* ctf-serialize.c (ctf_serialize): Prohibit addition of strings
    295 	with ctf_str_add_ref before serialization.  Ensure that the
    296 	ctf_str_pending_ref set is empty before strtab finalization.
    297 	(ctf_emit_type_sect): Add a ref to the ctt_name.
    298 	* ctf-create.c (ctf_add_generic): Add the ctt_name as a pending
    299 	ref.
    300 	* testsuite/libctf-writable/reserialize-strtab-corruption.*: New test.
    301 
    302 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    303 
    304 	* ctf-serialize.c (ctf_serialize): Preserve ctf_typemax across
    305 	serialization.
    306 
    307 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    308 
    309 	* ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_argv>: Remove.
    310 	* ctf-create.c (ctf_dtd_delete): No longer free it.
    311 	(ctf_add_function): Use the dtd_vlen, not dtu_argv.  Properly align.
    312 	* ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
    313 	* ctf-types.c (ctf_func_type_info): Just use the vlen.
    314 	(ctf_func_type_args): Likewise.
    315 
    316 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    317 
    318 	* ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_arr>: Remove.
    319 	* ctf-create.c (ctf_add_array): Use the dtd_vlen, not dtu_arr.
    320 	(ctf_set_array): Likewise.
    321 	* ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
    322 	* ctf-types.c (ctf_array_info): Just use the vlen.
    323 
    324 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    325 
    326 	* ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_enc>: Remove.
    327 	<dtd_u.dtu_slice>: Likewise.
    328 	<dtd_vlen>: New.
    329 	* ctf-create.c (ctf_add_generic): Perhaps allocate it.  All
    330 	callers adjusted.
    331 	(ctf_dtd_delete): Free it.
    332 	(ctf_add_slice): Use the dtd_vlen, not dtu_enc.
    333 	(ctf_add_encoded): Likewise.  Assert that this must be an int or
    334 	float.
    335 	* ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
    336 	* ctf-dedup.c (ctf_dedup_rhash_type): Use the dtd_vlen, not
    337 	dtu_slice.
    338 	* ctf-types.c (ctf_type_reference): Likewise.
    339 	(ctf_type_encoding): Remove most dynamic-type-specific code: just
    340 	get the vlen from the right place.  Report failure to look up the
    341 	underlying type's encoding.
    342 
    343 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    344 
    345 	* ctf-archive.c (ctf_archive_next): GNU style fix for do {} while.
    346 	* ctf-dedup.c (ctf_dedup_rhash_type): Likewise.
    347 	(ctf_dedup_rwalk_one_output_mapping): Likewise.
    348 	* ctf-dump.c (ctf_dump_format_type): Likewise.
    349 	* ctf-lookup.c (ctf_symbol_next): Likewise.
    350 	* swap.h (swap_thing): Likewise.
    351 
    352 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    353 
    354 	* ctf-serialize.c: General reshuffling, and...
    355 	(emit_symtypetab_state_t): New, migrated from
    356 	local variables in ctf_serialize.
    357 	(ctf_serialize): Split out most section sizing and
    358 	emission.
    359 	(ctf_symtypetab_sect_sizes): New (split out).
    360 	(ctf_emit_symtypetab_sects): Likewise.
    361 	(ctf_type_sect_size): Likewise.
    362 	(ctf_emit_type_sect): Likewise.
    363 
    364 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    365 
    366 	* ctf-impl.h (ctf_dict_t): Fix comment.
    367 
    368 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    369 
    370 	* ctf-create.c (symtypetab_delete_nonstatic_vars): Move
    371 	into ctf-serialize.c.
    372 	(ctf_symtab_skippable): Likewise.
    373 	(CTF_SYMTYPETAB_EMIT_FUNCTION): Likewise.
    374 	(CTF_SYMTYPETAB_EMIT_PAD): Likewise.
    375 	(CTF_SYMTYPETAB_FORCE_INDEXED): Likewise.
    376 	(symtypetab_density): Likewise.
    377 	(emit_symtypetab): Likewise.
    378 	(emit_symtypetab_index): Likewise.
    379 	(ctf_copy_smembers): Likewise.
    380 	(ctf_copy_lmembers): Likewise.
    381 	(ctf_copy_emembers): Likewise.
    382 	(ctf_sort_var): Likewise.
    383 	(ctf_serialize): Likewise.
    384 	(ctf_gzwrite): Likewise.
    385 	(ctf_compress_write): Likewise.
    386 	(ctf_write_mem): Likewise.
    387 	(ctf_write): Likewise.
    388 	* ctf-serialize.c: New file.
    389 	* Makefile.am (libctf_nobfd_la_SOURCES): Add it.
    390 	* Makefile.in: Regenerate.
    391 
    392 2021-03-18  Nick Alcock  <nick.alcock (a] oracle.com>
    393 
    394 	* ctf-link.c (ctf_link_lazy_open): Move up in the file, to near
    395 	ctf_link_add_ctf.
    396 	* ctf-lookup.c (ctf_lookup_symbol_idx): Repair tabdamage.
    397 	(ctf_lookup_by_sym_or_name): Likewise.
    398 	* testsuite/libctf-lookup/struct-iteration.c: Likewise.
    399 	* testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
    400 
    401 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    402 
    403 	* ctf-create.c (symtypetab_density): Report the symbol name as
    404 	well as index in the name != object error; note the likely
    405 	consequences.
    406 	* ctf-link.c (ctf_link_shuffle_syms): Report the symbol index
    407 	as well as name.
    408 
    409 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    410 
    411 	* ctf-link.c (ctf_link_shuffle_syms): Free ctf_dynsyms properly.
    412 
    413 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    414 
    415 	* ctf-dump.c (ctf_dump_format_type): Fix signed/unsigned confusion.
    416 
    417 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    418 
    419 	* ctf-dedup.c (ctf_dedup): Pass on errors from ctf_dedup_hash_type.
    420 	Call ctf_dedup_fini properly on other errors.
    421 	(ctf_dedup_emit_type): Set the errno on dynhash insertion failure.
    422 	* ctf-link.c (ctf_link_deduplicating_per_cu): Close outputs beyond
    423 	output 0 when asserting because >1 output is found.
    424 	(ctf_link_deduplicating): Likewise, when asserting because the
    425 	shared output is not the same as the passed-in fp.
    426 
    427 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    428 
    429 	* ctf-impl.h (ctf_dict_t) <ctf_link_type_mapping>: No longer used
    430 	by the nondeduplicating linker.
    431 	(ctf_add_type_mapping): Removed, now static.
    432 	(ctf_type_mapping): Likewise.
    433 	(ctf_dedup_type_mapping): New.
    434 	(ctf_dedup_t) <cd_input_nums>: New.
    435 	* ctf-dedup.c (ctf_dedup_init): Populate it.
    436 	(ctf_dedup_fini): Free it again.  Emphasise that this has to be
    437 	the last thing called.
    438 	(ctf_dedup): Populate it.
    439 	(ctf_dedup_populate_type_mapping): Removed.
    440 	(ctf_dedup_populate_type_mappings): Likewise.
    441 	(ctf_dedup_emit): No longer call it.  No longer call
    442 	ctf_dedup_fini either.
    443 	(ctf_dedup_type_mapping): New.
    444 	* ctf-link.c (ctf_unnamed_cuname): New.
    445 	(ctf_create_per_cu): Arguments must be non-null now.
    446 	(ctf_in_member_cb_arg): Removed.
    447 	(ctf_link): No longer populate it.  No longer discard the
    448 	mapping table.
    449 	(ctf_link_deduplicating_one_symtypetab): Use
    450 	ctf_dedup_type_mapping, not ctf_type_mapping.  Use
    451 	ctf_unnamed_cuname.
    452 	(ctf_link_one_variable): Likewise.  Pass in args individually: no
    453 	longer a ctf_variable_iter callback.
    454 	(empty_link_type_mapping): Removed.
    455 	(ctf_link_deduplicating_variables): Use ctf_variable_next, not
    456 	ctf_variable_iter.  No longer pack arguments to
    457 	ctf_link_one_variable into a struct.
    458 	(ctf_link_deduplicating_per_cu): Call ctf_dedup_fini once
    459 	all link phases are done.
    460 	(ctf_link_deduplicating): Likewise.
    461 	(ctf_link_intern_extern_string): Improve comment.
    462 	(ctf_add_type_mapping): Migrate...
    463 	(ctf_type_mapping): ... these functions...
    464 	* ctf-create.c (ctf_add_type_mapping): ... here...
    465 	(ctf_type_mapping): ... and make static, for the sole use of
    466 	ctf_add_type.
    467 
    468 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    469 
    470 	* ctf-link.c (ctf_link_one_variable): Remove reference to
    471 	"unconflicted link mode".
    472 
    473 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    474 
    475 	* ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is
    476 	always identical to CUNAME.
    477 	(ctf_link_deduplicating_one_symtypetab): Adjust.
    478 	(ctf_link_one_type): Remove.
    479 	(ctf_link_one_input_archive_member): Likewise.
    480 	(ctf_link_close_one_input_archive): Likewise.
    481 	(ctf_link_one_input_archive): Likewise.
    482 	(ctf_link): No longer call it.  Drop CTF_LINK_NONDEDUP path.
    483 	Improve header comment a bit (dicts, not files).  Adjust
    484 	ctf_create_per_cu call.
    485 	(ctf_link_deduplicating_variables): Simplify.
    486 	(ctf_link_in_member_cb_arg_t) <cu_name>: Remove.
    487 	<in_input_cu_file>: Likewise.
    488 	<in_fp_parent>: Likewise.
    489 	<done_parent>: Likewise.
    490 	(ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
    491 
    492 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    493 
    494 	* ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope.
    495 	(ctf_enum_iter): Reimplement in terms of ctf_enum_next.
    496 	(ctf_type_iter): Reimplement in terms of ctf_type_next.
    497 	(ctf_type_iter_all): Likewise.
    498 	(ctf_variable_iter): Reimplement in terms of ctf_variable_next.
    499 	* ctf-archive.c (ctf_archive_iter_internal): Remove.
    500 	(ctf_archive_iter): Reimplement in terms of ctf_archive_next.
    501 
    502 2021-03-02  Nick Alcock  <nick.alcock (a] oracle.com>
    503 
    504 	* ctf-archive.c (ctf_archive_next): Set the name of parents in
    505 	single-member archives.
    506 
    507 2021-02-26  Alan Modra  <amodra (a] gmail.com>
    508 
    509 	* Makefile.in: Regenerate.
    510 
    511 2021-02-21  Alan Modra  <amodra (a] gmail.com>
    512 
    513 	* configure.ac: Invoke AC_CANONICAL_TARGET, AC_CANONICAL_HOST
    514 	and AC_CANONICAL_BUILD.
    515 	* configure: Regenerate.
    516 	* Makefile.in: Regenerate.
    517 
    518 2021-02-20  Nick Alcock  <nick.alcock (a] oracle.com>
    519 
    520 	* ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
    521 	<ctf_symhash_latest>: Likewise.
    522 	(struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
    523 	<ctfi_symnamedicts>: New.
    524 	<ctfi_syms>: Remove.
    525 	(ctf_lookup_symbol_name): Remove.
    526 	* ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
    527 	parent properly.  Make static.
    528 	(ctf_lookup_symbol_idx): New, linear search for the symbol name,
    529 	cached in the crossdict cache's ctf_symhash (if available), or
    530 	this dict's (otherwise).
    531 	(ctf_try_lookup_indexed): Allow the symname to be passed in.
    532 	(ctf_lookup_by_symbol): Turn into a wrapper around...
    533 	(ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
    534 	using ctf_lookup_symbol_idx in non-writable dicts.  Special-case
    535 	name lookup in dynamic dicts without reported symbols, which have
    536 	no symtab or dynsymidx but where name lookup should still work.
    537 	(ctf_lookup_by_symbol_name): New, another wrapper.
    538 	* ctf-archive.c (enosym): Note that this is present in
    539 	ctfi_symnamedicts too.
    540 	(ctf_arc_close): Adjust for removal of ctfi_syms.  Free the
    541 	ctfi_symnamedicts.
    542 	(ctf_arc_flush_caches): Likewise.
    543 	(ctf_dict_open_cached): Memoize the first cached dict in the
    544 	crossdict cache.
    545 	(ctf_arc_lookup_symbol): Turn into a wrapper around...
    546 	(ctf_arc_lookup_sym_or_name): ... this.  No longer cache
    547 	ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
    548 	still cache the dicts those lookups succeed in).  Add
    549 	lookup-by-name support, with dicts of successful lookups cached in
    550 	ctfi_symnamedicts.  Refactor the caching code a bit.
    551 	(ctf_arc_lookup_symbol_name): New, another wrapper.
    552 	* ctf-open.c (ctf_dict_close): Free the ctf_symhash.
    553 	* libctf.ver (LIBCTF_1.2): New version.  Add
    554 	ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
    555 	* testsuite/libctf-lookup/enum-symbol.c (main): Use
    556 	ctf_arc_lookup_symbol rather than looking up the name ourselves.
    557 	Fish it out repeatedly, to make sure that symbol caching isn't
    558 	broken.
    559 	(symidx_64): Remove.
    560 	(symidx_32): Remove.
    561 	* testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
    562 	in an unlinked object file (indexed symtypetab sections only).
    563 	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
    564 	(try_maybe_reporting): Check symbol types via
    565 	ctf_lookup_by_symbol_name as well as ctf_symbol_next.
    566 	* testsuite/libctf-lookup/conflicting-type-syms.*: New test of
    567 	lookups in a multi-dict archive.
    568 
    569 2021-02-20  Alan Modra  <amodra (a] gmail.com>
    570 
    571 	* testsuite/config/default.exp (ld_L_opt): Define.
    572 	* testsuite/lib/ctf-lib.exp (load_common_lib): Delete.  Instead load
    573 	ld-lib.exp.
    574 	(run_host_cmd, run_host_cmd_yesno, check_compiler_available): Delete.
    575 	(compile_one_cc, check_ctf_available): Delete.
    576 
    577 2021-02-03  Nick Alcock  <nick.alcock (a] oracle.com>
    578 
    579 	* configure.ac (ac_cv_libctf_bfd_elf): Include string.h.
    580 	* configure: Regenerated.
    581 
    582 2021-02-03  Nick Alcock  <nick.alcock (a] oracle.com>
    583 
    584 	* configure.ac (EXPECT): Check for, in order to define...
    585 	(TCL_TRY): ... this, if Tcl supports try/catch.
    586 	* Makefile.am (TCL_TRY): Run the testsuite only if set.
    587 	* configure: Regenerated.
    588 	* Makefile.in: Likewise.
    589 
    590 2021-02-02  Nick Alcock  <nick.alcock (a] oracle.com>
    591 
    592 	* configure.ac (CTF_LIBADD): Remove explicit -lintl population in
    593 	favour of LIBINTL.
    594 	* Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
    595 	include $(LIBINTL).
    596 	(check-DEJAGNU): Pass down to tests as well.
    597 	* configure: Regenerated.
    598 	* Makefile.in: Likewise.
    599 
    600 2021-01-27  Nick Alcock  <nick.alcock (a] oracle.com>
    601 
    602 	* ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
    603 	(ctf_str_add_ref): Likewise.
    604 	(ctf_str_add_external): Likewise.
    605 	* ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
    606 	* ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
    607 	against NULL name.
    608 	(ctf_dedup_maybe_synthesize_forward): Likewise.
    609 
    610 2021-01-27  Nick Alcock  <nick.alcock (a] oracle.com>
    611 
    612 	* ctf-create.c (ctf_serialize): Fix shadowing.
    613 
    614 2021-01-27  Nick Alcock  <nick.alcock (a] oracle.com>
    615 
    616 	* ctf-create.c (ctf_add_encoded): Add check for non-empty name.
    617 	(ctf_add_forward): Likewise.
    618 	(ctf_add_typedef): Likewise.
    619 
    620 2021-01-27  Nick Alcock  <nick.alcock (a] oracle.com>
    621 
    622 	* ctf-open.c (init_types): Rip out code to check anonymous typedef
    623 	nodes.
    624 	* ctf-create.c (ctf_add_reftype): Likewise.
    625 	* ctf-lookup.c (refresh_pptrtab): Likewise.
    626 
    627 2021-01-27  Nick Alcock  <nick.alcock (a] oracle.com>
    628 
    629 	* ctf-impl.c (_libctf_nonnull_): Add parameters.
    630 	(LCTF_LINKING): New flag.
    631 	(ctf_dict_t) <ctf_link_flags>: Mention it.
    632 	* ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
    633 	(ctf_write): Likewise, including in child dictionaries.
    634 	(ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
    635 	are no reported symbols.
    636 	* ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
    637 	the variable has been reported as a symbol by the linker.
    638 	(symtypetab_skippable): Mention relationship between SYMFP and the
    639 	flags.
    640 	(symtypetab_density): Adjust nonnullity.  Exit early if no symbols
    641 	were reported and force-indexing is off (i.e., we are doing a
    642 	final link).
    643 	(ctf_serialize): Handle the !LCTF_LINKING case by writing out an
    644 	indexed, sorted symtypetab (and allow SYMFP to be NULL in this
    645 	case).  Turn sorting off if this is a non-final link.  Only delete
    646 	nonstatic vars if we are filtering symbols and the linker has
    647 	reported some.
    648 	* testsuite/libctf-regression/nonstatic-var-section-ld-r*:
    649 	New test of variable and symtypetab section population when
    650 	ld -r is used.
    651 	* testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
    652 	Likewise, when ld of an executable is used.
    653 	* testsuite/libctf-regression/nonstatic-var-section-ld.lk:
    654 	Likewise, when ld -shared alone is used.
    655 	* testsuite/libctf-regression/nonstatic-var-section-ld*.c:
    656 	Lookup programs for the above.
    657 	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
    658 	test, testing survival of symbols across ctf_write paths.
    659 	* testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
    660 	nonshared, suppressing linking of the SOURCE with -shared.
    661 
    662 2021-01-19  Nick Alcock  <nick.alcock (a] oracle.com>
    663 
    664 	* ctf-create.c (membadd): Transform ""-named members into
    665 	NULL-named ones.
    666 	* testsuite/libctf-regression/type-add-unnamed-struct*: New test.
    667 
    668 2021-01-19  Nick Alcock  <nick.alcock (a] oracle.com>
    669 
    670 	* ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
    671 	base type if looking up a nonexistent pointer type.
    672 	* testsuite/libctf-regression/pptrtab*: Test it.
    673 
    674 2021-01-13  Alan Modra  <amodra (a] gmail.com>
    675 
    676 	* Makefile.in: Regenerate.
    677 
    678 2021-01-12  H.J. Lu  <hongjiu.lu (a] intel.com>
    679 
    680 	PR binutils/26792
    681 	* configure.ac: Use GNU_MAKE_JOBSERVER.
    682 	* aclocal.m4: Regenerated.
    683 	* configure: Likewise.
    684 
    685 2021-01-11  H.J. Lu  <hongjiu.lu (a] intel.com>
    686 
    687 	PR ld/27173
    688 	* configure: Regenerated.
    689 
    690 2021-01-09  H.J. Lu  <hongjiu.lu (a] intel.com>
    691 
    692 	* configure: Regenerated.
    693 
    694 2021-01-09  Nick Clifton  <nickc (a] redhat.com>
    695 
    696 	* 2.36 release branch crated.
    697 
    698 2021-01-09  Alan Modra  <amodra (a] gmail.com>
    699 
    700 	* configure: Regenerate.
    701 
    702 2021-01-07  Samuel Thibault  <samuel.thibault (a] gnu.org>
    703 
    704 	* configure: Regenerate.
    705 
    706 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    707 
    708 	* testsuite/libctf-lookup/struct-iteration.c (main):
    709 	ctf_member_count returns an int.
    710 
    711 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    712 
    713 	* Makefile.am (BASEDIR): New.
    714 	(BFDDIR): Likewise.
    715 	(check-DEJAGNU): Add development.exp to prerequisites.
    716 	(development.exp): New.
    717 	(CONFIG_STATUS_DEPENDENCIES): New.
    718 	(EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
    719 	(DISTCLEANFILES): Likewise.
    720 	* Makefile.in: Regenerated.
    721 	* testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
    722 	* testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
    723 	* testsuite/libctf-regression/regression.exp: Likewise.
    724 
    725 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    726 
    727 	* ctf-types.c (ctf_type_aname): Print forwards to unions and enums
    728 	properly.
    729 
    730 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    731 
    732 	* ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
    733 	<ctf_pptrtab_len>: New.
    734 	<ctf_pptrtab_typemax>: New.
    735 	* ctf-create.c (ctf_serialize): Update accordingly.
    736 	(ctf_add_reftype): Note that we don't need to update pptrtab here,
    737 	despite updating ptrtab.
    738 	* ctf-open.c (ctf_dict_close): Destroy the pptrtab.
    739 	(ctf_import): Likewise.
    740 	(ctf_import_unref): Likewise.
    741 	* ctf-lookup.c (grow_pptrtab): New.
    742 	(refresh_pptrtab): New, update a pptrtab.
    743 	(ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
    744 	(ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
    745 	use it in addition to the parent's ptrtab when parent dicts are
    746 	searched.
    747 	* testsuite/libctf-regression/regression.exp: New testsuite for
    748 	regression tests.
    749 	* testsuite/libctf-regression/pptrtab*: New test.
    750 	* testsuite/libctf-writable/writable.exp: New testsuite for tests of
    751 	writable CTF dicts.
    752 	* testsuite/libctf-writable/pptrtab*: New test.
    753 
    754 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    755 
    756 	* ctf-archive.c (ctf_archive_iter): Remove outdated comment.
    757 
    758 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    759 
    760 	* ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
    761 	<ctn_next>: ... here.
    762 	* ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
    763 	* ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
    764 	* ctf-types.c (ctf_member_iter): Reimplement in terms of...
    765 	(ctf_member_next): ... this.  Support recursive unnamed member
    766 	iteration (off by default).
    767 	(ctf_member_info): Look up members in unnamed sub-structs.
    768 	* ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
    769 	(ctf_dedup_emit_struct_members): Likewise.
    770 	* testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
    771 	members, and a normal member after the end.
    772 	* testsuite/libctf-lookup/struct-iteration.c: Verify that
    773 	ctf_member_count is consistent with the number of successful returns
    774 	from a non-recursive ctf_member_next.
    775 	* testsuite/libctf-lookup/struct-iteration-*: New, test iteration
    776 	over struct members.
    777 	* testsuite/libctf-lookup/struct-lookup.c: New test.
    778 	* testsuite/libctf-lookup/struct-lookup.lk: New test.
    779 
    780 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    781 
    782 	* ctf-link.c (ctf_link_warn_outdated_inputs): New.
    783 	(ctf_link_write): Call it.
    784 
    785 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    786 
    787 	* testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
    788 	* testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
    789 	* testsuite/libctf-lookup/enum-symbol.c: New lookup test.
    790 
    791 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    792 
    793 	* Makefile.am (EXPECT): New.
    794 	(RUNTEST): Likewise.
    795 	(RUNTESTFLAGS): Likewise.
    796 	(CC_FOR_TARGET): Likewise.
    797 	(check-DEJAGNU): Likewise.
    798 	(AUTOMAKE_OPTIONS): Add dejagnu.
    799 	* Makefile.in: Regenerated.
    800 	* testsuite/config/default.exp: New.
    801 	* testsuite/lib/ctf-lib.exp: Likewise.
    802 	* testsuite/libctf-lookup/enum.lk: New test.
    803 	* testsuite/libctf-lookup/enum-ctf.c: New CTF input.
    804 	* testsuite/libctf-lookup/enum.c: New lookup test.
    805 	* testsuite/libctf-lookup/ambiguous-struct*.c: New test.
    806 	* testsuite/libctf-lookup/lookup.exp: New.
    807 
    808 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    809 
    810 	* configure.ac (BFD_LIBADD): Remove.
    811 	(BFD_DEPENDENCIES): Likewise. Remove associated cases.
    812 	(SHARED_LIBADD): Rename to...
    813 	(CTF_LIBADD): ... this.  Stick in a suitable libiberty even when
    814 	linking statically.
    815 	* Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
    816 	libctf uses libintl.
    817 	(libctf_la_LIBADD): Reference libbfd.la directly, not via
    818 	BFD_LIBADD.
    819 	(libctf_la_DEPENDENCIES): Remove.
    820 	* Makefile.in: Regenerate.
    821 	* configure: Likewise.
    822 
    823 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    824 
    825 	* ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
    826 	* ctf-types.c (ctf_type_aname): No longer deal with slices here.
    827 	* ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
    828 	(CTF_FT_REFS): New.
    829 	(CTF_FT_BITFIELD): Likewise.
    830 	(CTF_FT_ID): Likewise.
    831 	(ctf_dump_member): Do not do indentation here. Migrate the
    832 	type-printing parts of this into...
    833 	(ctf_dump_format_type): ... here, to be shared by all type printers.
    834 	Get the errno value for non-representable types right.  Do not print
    835 	bitfield info for non-bitfields.  Improve the format and indentation
    836 	of other type output.  Shuffle spacing around to make all indentation
    837 	either 'width of column' or 4 chars.
    838 	(ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
    839 	(ctf_dump_objts): Likewise.  Spacing shuffle.
    840 	(ctf_dump_var): Likewise.
    841 	(type_hex_digits): Migrate down in the file, to above its new user.
    842 	(ctf_dump_type): Indent here instead.  Pass CTF_FT_REFS to
    843 	ctf_dump_format_type. Don't trim off excess linefeeds now we no
    844 	longer generate them.  Dump enumerated types.
    845 
    846 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    847 
    848 	* ctf-types.c (ctf_type_resolve): Improve comment.
    849 	(ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
    850 	Emit errors into the right dict.
    851 	(ctf_type_align): Likewise.
    852 	* ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
    853 	when adding a member without explicit offset when this member, or
    854 	the previous member, is incomplete.
    855 	* ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
    856 	forwards.
    857 	(ctf_dump_member): Do not try to print their alignment.
    858 
    859 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    860 
    861 	* ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
    862 	(ctf_dump_format_type): Don't emit the size for function objects.
    863 	Dump the element type of arrays like we dump the pointed-to type of
    864 	pointers, etc.
    865 
    866 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    867 
    868 	* ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
    869 	(ctf_dump_header): Add 0x to the hex magic number.
    870 	(ctf_dump_str): Add 0x to the hex string offsets.
    871 	(ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
    872 	(ctf_dump_type): Adjust.  Free it when we're done.
    873 	(type_hex_digits): New.
    874 	(ctf_dump_member): Align output depending on the width of the type
    875 	ID being generated.  Use printf padding, not a loop, to generate
    876 	indentation.
    877 
    878 2021-01-05  Nick Alcock  <nick.alcock (a] oracle.com>
    879 
    880 	* ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
    881 
    882 2021-01-04  Nicolas Boulenguez  <nicolas (a] debian.org>
    883 
    884 	PR 27117
    885 	* configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
    886 	ACLOCAL_AMFLAGS -I dirs.
    887 	* configure: Regenerate.
    888 
    889 2021-01-01  Alan Modra  <amodra (a] gmail.com>
    890 
    891 	Update year range in copyright notice of all files.
    892 
    893 For older changes see ChangeLog-2020
    894 
    896 Copyright (C) 2021-2025 Free Software Foundation, Inc.
    897 
    898 Copying and distribution of this file, with or without modification,
    899 are permitted in any medium without royalty provided the copyright
    900 notice and this notice are preserved.
    901 
    902 Local Variables:
    903 mode: change-log
    904 left-margin: 8
    905 fill-column: 74
    906 version-control: never
    907 End:
    908