xref: /netbsd-src/external/gpl3/gdb/dist/libctf/ChangeLog (revision 12989c96ee862c63521a9ead8c44629b7a2ba9b1)
1*12989c96Schristos2024-01-15  Nick Clifton  <nickc@redhat.com>
2*12989c96Schristos
3*12989c96Schristos	* 2.42 branch point.
4*12989c96Schristos
5*12989c96Schristos2023-11-15  Arsen Arsenović  <arsen@aarsen.me>
6*12989c96Schristos
7*12989c96Schristos	* Makefile.am (SUBDIRS): Define to empty to suppress a check in
8*12989c96Schristos	Automake.
9*12989c96Schristos	* Makefile.in: Regenerate.
10*12989c96Schristos	* configure.ac (CTF_LIBADD): Use LTLIBINTL rather than LIBINTL.
11*12989c96Schristos	* aclocal.m4: Regenerate.
12*12989c96Schristos	* configure: Regenerate.
13*12989c96Schristos
14*12989c96Schristos2023-07-03  Nick Clifton  <nickc@redhat.com>
15*12989c96Schristos
16*12989c96Schristos	2.41 Branch Point.
17*12989c96Schristos
18*12989c96Schristos2022-12-31  Nick Clifton  <nickc@redhat.com>
19*12989c96Schristos
20*12989c96Schristos	* 2.40 branch created.
21*12989c96Schristos
224b169a6bSchristos2022-07-08  Nick Clifton  <nickc@redhat.com>
238dffb485Schristos
244b169a6bSchristos	* 2.39 branch created.
258dffb485Schristos
264b169a6bSchristos2022-01-22  Nick Clifton  <nickc@redhat.com>
278dffb485Schristos
284b169a6bSchristos	* 2.38 release branch created.
294b169a6bSchristos
304b169a6bSchristos2021-11-08  Nick Alcock  <nick.alcock@oracle.com>
314b169a6bSchristos
324b169a6bSchristos	* doc/ctf-spec.texi: New file.
334b169a6bSchristos	* configure.ac (MAKEINFO): Add.
344b169a6bSchristos	(BUILD_INFO): Likewise.
354b169a6bSchristos	(AC_CONFIG_FILES) [doc/Makefile]: Add.
364b169a6bSchristos	* Makefile.am [BUILD_INFO] (SUBDIRS): Add doc/.
374b169a6bSchristos	* doc/Makefile.am: New file.
384b169a6bSchristos	* doc/Makefile.in: Likewise.
398dffb485Schristos	* configure: Regenerated.
404b169a6bSchristos	* Makefile.in: Likewise.
418dffb485Schristos
424b169a6bSchristos2021-10-25  Nick Alcock  <nick.alcock@oracle.com>
438dffb485Schristos
444b169a6bSchristos	* ctf-types.c (ctf_type_rvisit): Handle nonrepresentable types.
458dffb485Schristos
464b169a6bSchristos2021-10-25  Nick Alcock  <nick.alcock@oracle.com>
478dffb485Schristos
484b169a6bSchristos	* ctf-dump.c (ctf_dump_type): Do not abort on error.
498dffb485Schristos
504b169a6bSchristos2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
518dffb485Schristos
524b169a6bSchristos	* ctf-lookup.c (ctf_lookup_by_name_internal): Fix pptrtab bounds.
534b169a6bSchristos	* testsuite/libctf-writable/pptrtab-writable-page-deep-lookup.*:
544b169a6bSchristos	New test.
558dffb485Schristos
564b169a6bSchristos2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
578dffb485Schristos
584b169a6bSchristos	* testsuite/libctf-lookup/enum-symbol.c: Remove unused label.
594b169a6bSchristos	* testsuite/libctf-lookup/conflicting-type-syms.c: Remove unused
604b169a6bSchristos	variables.
614b169a6bSchristos	* testsuite/libctf-regression/pptrtab.c: Likewise.
624b169a6bSchristos	* testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
634b169a6bSchristos	* testsuite/libctf-writable/pptrtab.c: Likewise.
644b169a6bSchristos	* testsuite/libctf-writable/reserialize-strtab-corruption.c:
654b169a6bSchristos	Likewise.
664b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld-r.c: Fix
674b169a6bSchristos	format string.
684b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld.c:
694b169a6bSchristos	Likewise.
704b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld.lk: Adjust.
714b169a6bSchristos	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Fix
724b169a6bSchristos	initializer.
738dffb485Schristos
744b169a6bSchristos2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
758dffb485Schristos
764b169a6bSchristos	* ctf-open.c (ctf_bufopen_internal): Don't complain about corrupt
774b169a6bSchristos	function index symtypetab sections if this is an old-format
784b169a6bSchristos	function symtypetab section (which should be ignored in any case).
794b169a6bSchristos	Fix bad grammar.
808dffb485Schristos
814b169a6bSchristos2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
828dffb485Schristos
834b169a6bSchristos	* configure: Regenerate.
848dffb485Schristos	* Makefile.in: Regenerate.
854b169a6bSchristos
864b169a6bSchristos2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
874b169a6bSchristos
884b169a6bSchristos	PR libctf/27967
894b169a6bSchristos	* configure.ac (VERSION_FLAGS): Replace with...
904b169a6bSchristos	(ac_cv_libctf_version_script): ... this multiple test.
914b169a6bSchristos	(VERSION_FLAGS_NOBFD): Substitute this too.
924b169a6bSchristos	* Makefile.am (libctf_nobfd_la_LDFLAGS): Use it.  Split out...
934b169a6bSchristos	(libctf_ldflags_nover): ... non-versioning flags here.
944b169a6bSchristos	(libctf_la_LDFLAGS): Use it.
954b169a6bSchristos	* libctf.ver: Give every symbol not in libctf-nobfd a comment on
964b169a6bSchristos	the same line noting as much.
974b169a6bSchristos
984b169a6bSchristos2021-09-27  Nick Alcock  <nick.alcock@oracle.com>
994b169a6bSchristos
1004b169a6bSchristos	PR libctf/27360
1014b169a6bSchristos	* Makefile.am (libctf_la_LIBADD): Link against libiberty
1024b169a6bSchristos	before pulling in libbfd.la or pulling in libctf-nobfd.la.
1034b169a6bSchristos	* Makefile.in: Regenerate.
1044b169a6bSchristos
1054b169a6bSchristos2021-07-03  Nick Clifton  <nickc@redhat.com>
1064b169a6bSchristos
1074b169a6bSchristos	* 2.37 release branch created.
1084b169a6bSchristos
1094b169a6bSchristos2021-05-09  Alan Modra  <amodra@gmail.com>
1104b169a6bSchristos
1114b169a6bSchristos	* ctf-impl.h (ctf_dynset_eq_string): Don't declare.
1124b169a6bSchristos	* ctf-hash.c (ctf_dynset_eq_string): Delete function.
1134b169a6bSchristos	* ctf-dedup.c (make_set_element): Use htab_eq_string.
1144b169a6bSchristos	(ctf_dedup_atoms_init, ADD_CITER, ctf_dedup_init): Likewise.
1154b169a6bSchristos	(ctf_dedup_conflictify_unshared): Likewise.
1164b169a6bSchristos	(ctf_dedup_walk_output_mapping): Likewise.
1174b169a6bSchristos
1184b169a6bSchristos2021-05-06  Nick Alcock  <nick.alcock@oracle.com>
1194b169a6bSchristos
1204b169a6bSchristos	* testsuite/lib/ctf-lib.exp: Use -gctf, not -gt.
1214b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld-r.lk:
1224b169a6bSchristos	Hidden symbols now get into the symtypetab anyway.
1234b169a6bSchristos
1244b169a6bSchristos2021-05-06  Nick Alcock  <nick.alcock@oracle.com>
1254b169a6bSchristos
1264b169a6bSchristos	* ctf-open.c (init_types): Unknown types may have names.
1274b169a6bSchristos	* ctf-types.c (ctf_type_resolve): CTF_K_UNKNOWN is as
1284b169a6bSchristos	non-representable as type ID 0.
1294b169a6bSchristos	(ctf_type_aname): Print unknown types.
1304b169a6bSchristos	* ctf-dedup.c (ctf_dedup_hash_type): Do not early-exit for
1314b169a6bSchristos	CTF_K_UNKNOWN types: they have real hash values now.
1324b169a6bSchristos	(ctf_dedup_rwalk_one_output_mapping): Treat CTF_K_UNKNOWN types
1334b169a6bSchristos	like other types with no referents: call the callback and do not
1344b169a6bSchristos	skip them.
1354b169a6bSchristos	(ctf_dedup_emit_type): Emit via...
1364b169a6bSchristos	* ctf-create.c (ctf_add_unknown): ... this new function.
1374b169a6bSchristos	* libctf.ver (LIBCTF_1.2): Add it.
1384b169a6bSchristos
1394b169a6bSchristos2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
1404b169a6bSchristos
1414b169a6bSchristos	* configure.ac: Check for dlsym, not dlopen.
1428dffb485Schristos	* configure: Regenerate.
1438dffb485Schristos
1444b169a6bSchristos2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
1458dffb485Schristos
1464b169a6bSchristos	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c: Don't
1474b169a6bSchristos	leak buf.
1488dffb485Schristos
1494b169a6bSchristos2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
1508dffb485Schristos
1514b169a6bSchristos	PR libctf/27628
1524b169a6bSchristos	* ctf-lookup.c (isqualifier): Don't dereference out-of-bounds
1534b169a6bSchristos	qhash values.
1548dffb485Schristos
1554b169a6bSchristos2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
1568dffb485Schristos
1574b169a6bSchristos	* ctf-open-bfd.c (ctf_bfdopen_ctfsect): Initialize debugging.
1588dffb485Schristos
1594b169a6bSchristos2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
1608dffb485Schristos
1614b169a6bSchristos	PR libctf/27628
1624b169a6bSchristos	* ctf-serialize.c (ctf_emit_type_sect): Allow for a NULL vlen in
1634b169a6bSchristos	CTF_K_FUNCTION types.
1648dffb485Schristos
1654b169a6bSchristos2021-03-25  Nick Alcock  <nick.alcock@oracle.com>
1668dffb485Schristos
1674b169a6bSchristos	* ctf-dump.c (ctf_dump_format_type): Don't emit size or alignment
1684b169a6bSchristos	on error.
1698dffb485Schristos
1704b169a6bSchristos2021-03-21  Alan Modra  <amodra@gmail.com>
1718dffb485Schristos
1724b169a6bSchristos	* ctf-impl.h: Include string.h.
1738dffb485Schristos
1744b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
1758dffb485Schristos
1764b169a6bSchristos	* ctf-types.c (ctf_type_encoding): Support, after a fashion, for enums.
1774b169a6bSchristos	* ctf-dump.c (ctf_dump_format_type): Do not report enums' degenerate
1784b169a6bSchristos	encoding.
1798dffb485Schristos
1804b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
1818dffb485Schristos
1824b169a6bSchristos	* ctf-dedup.c (ctf_dedup_rhash_type): Report errors on the input
1834b169a6bSchristos	dict properly.
1844b169a6bSchristos	* ctf-open.c (ctf_bufopen_internal): Report errors initializing
1854b169a6bSchristos	the atoms table.
1868dffb485Schristos
1874b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
1888dffb485Schristos
1894b169a6bSchristos	* ctf-impl.h (ctf_next_t) <ctn_tp>: New.
1904b169a6bSchristos	<u.ctn_mp>: Remove.
1914b169a6bSchristos	<u.ctn_lmp>: Remove.
1924b169a6bSchristos	<u.ctn_vlen>: New.
1934b169a6bSchristos	* ctf-types.c (ctf_struct_member): New.
1944b169a6bSchristos	(ctf_member_next): Use it, dropping separate large/small code paths.
1954b169a6bSchristos	(ctf_type_align): Likewise.
1964b169a6bSchristos	(ctf_member_info): Likewise.
1974b169a6bSchristos	(ctf_type_rvisit): Likewise.
1988dffb485Schristos
1994b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
2008dffb485Schristos
2014b169a6bSchristos	* ctf-impl.h (ctf_dtdef_t) <dtu_members>: Remove.
2024b169a6bSchristos	<dtd_u>: Likewise.
2034b169a6bSchristos	(ctf_dmdef_t): Remove.
2044b169a6bSchristos	(struct ctf_next) <u.ctn_dmd>: Remove.
2054b169a6bSchristos	* ctf-create.c (INITIAL_VLEN): New, more-or-less arbitrary initial
2064b169a6bSchristos	vlen size.
2074b169a6bSchristos	(ctf_add_enum): Use it.
2084b169a6bSchristos	(ctf_dtd_delete): Do not free the (removed) dmd; remove string
2094b169a6bSchristos	refs from the vlen on struct deletion.
2104b169a6bSchristos	(ctf_add_struct_sized): Populate the vlen: do it by hand if
2114b169a6bSchristos	promoting forwards.  Always populate the full-size
2124b169a6bSchristos	lsizehi/lsizelo members.
2138dffb485Schristos	(ctf_add_union_sized): Likewise.
2144b169a6bSchristos	(ctf_add_member_offset): Set up the vlen rather than the dmd.
2154b169a6bSchristos	Expand it as needed, repointing string refs via
2164b169a6bSchristos	ctf_str_move_pending. Add the member names as pending strings.
2174b169a6bSchristos	Always populate the full-size lsizehi/lsizelo members.
2184b169a6bSchristos	(membadd): Remove, folding back into...
2194b169a6bSchristos	(ctf_add_type_internal): ... here, adding via an ordinary
2204b169a6bSchristos	ctf_add_struct_sized and _next iteration rather than doing
2214b169a6bSchristos	everything by hand.
2224b169a6bSchristos	* ctf-serialize.c (ctf_copy_smembers): Remove this...
2234b169a6bSchristos	(ctf_copy_lmembers): ... and this...
2244b169a6bSchristos	(ctf_emit_type_sect): ... folding into here. Figure out if a
2254b169a6bSchristos	ctf_stype_t is needed here, not in ctf_add_*_sized.
2264b169a6bSchristos	(ctf_type_sect_size): Figure out the ctf_stype_t stuff the same
2274b169a6bSchristos	way here.
2284b169a6bSchristos	* ctf-types.c (ctf_member_next): Remove the dmd path and always
2294b169a6bSchristos	use the vlen.  Force large-structure usage for dynamic types.
2304b169a6bSchristos	(ctf_type_align): Likewise.
2314b169a6bSchristos	(ctf_member_info): Likewise.
2324b169a6bSchristos	(ctf_type_rvisit): Likewise.
2334b169a6bSchristos	* testsuite/libctf-regression/type-add-unnamed-struct-ctf.c: Add a
2344b169a6bSchristos	self-referential type to this test.
2354b169a6bSchristos	* testsuite/libctf-regression/type-add-unnamed-struct.c: Adjusted
2364b169a6bSchristos	accordingly.
2374b169a6bSchristos	* testsuite/libctf-regression/type-add-unnamed-struct.lk: Likewise.
2388dffb485Schristos
2394b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
2408dffb485Schristos
2414b169a6bSchristos	* ctf-impl.h (ctf_dtdef_t) <dtd_vlen_alloc>: New.
2424b169a6bSchristos	(ctf_str_move_pending): Declare.
2434b169a6bSchristos	* ctf-string.c (ctf_str_add_ref_internal): Fix error return.
2444b169a6bSchristos	(ctf_str_move_pending): New.
2454b169a6bSchristos	* ctf-create.c (ctf_grow_vlen): New.
2464b169a6bSchristos	(ctf_dtd_delete): Zero out the vlen_alloc after free.  Free the
2474b169a6bSchristos	vlen later: iterate over it and free enum name refs first.
2484b169a6bSchristos	(ctf_add_generic): Populate dtd_vlen_alloc from vlen.
2494b169a6bSchristos	(ctf_add_enum): populate the vlen; do it by hand if promoting
2504b169a6bSchristos	forwards.
2514b169a6bSchristos	(ctf_add_enumerator): Set up the vlen rather than the dmd.  Expand
2524b169a6bSchristos	it as needed, repointing string refs via ctf_str_move_pending. Add
2534b169a6bSchristos	the enumerand names as pending strings.
2544b169a6bSchristos	* ctf-serialize.c (ctf_copy_emembers): Remove.
2554b169a6bSchristos	(ctf_emit_type_sect): Copy the vlen into place and ref the
2564b169a6bSchristos	strings.
2574b169a6bSchristos	* ctf-types.c (ctf_enum_next): The dynamic portion now uses
2584b169a6bSchristos	the same code as the non-dynamic.
2594b169a6bSchristos	(ctf_enum_name): Likewise.
2604b169a6bSchristos	(ctf_enum_value): Likewise.
2614b169a6bSchristos	* testsuite/libctf-lookup/enum-many-ctf.c: New test.
2624b169a6bSchristos	* testsuite/libctf-lookup/enum-many.lk: New test.
2638dffb485Schristos
2644b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
2658dffb485Schristos
2664b169a6bSchristos	* ctf-hash.c (ctf_dynset_elements): New.
2674b169a6bSchristos	* ctf-impl.h (ctf_dynset_elements): Declare it.
2684b169a6bSchristos	(ctf_str_add_pending): Likewise.
2694b169a6bSchristos	(ctf_dict_t) <ctf_str_pending_ref>: New, set of refs that must be
2704b169a6bSchristos	added during serialization.
2714b169a6bSchristos	* ctf-string.c (ctf_str_create_atoms): Initialize it.
2724b169a6bSchristos	(CTF_STR_ADD_REF): New flag.
2734b169a6bSchristos	(CTF_STR_MAKE_PROVISIONAL): Likewise.
2744b169a6bSchristos	(CTF_STR_PENDING_REF): Likewise.
2754b169a6bSchristos	(ctf_str_add_ref_internal): Take a flags word rather than int
2764b169a6bSchristos	params.  Populate, and clear out, ctf_str_pending_ref.
2774b169a6bSchristos	(ctf_str_add): Adjust accordingly.
2784b169a6bSchristos	(ctf_str_add_external): Likewise.
2794b169a6bSchristos	(ctf_str_add_pending): New.
2804b169a6bSchristos	(ctf_str_remove_ref): Also remove the potential ref if it is a
2814b169a6bSchristos	pending ref.
2824b169a6bSchristos	* ctf-serialize.c (ctf_serialize): Prohibit addition of strings
2834b169a6bSchristos	with ctf_str_add_ref before serialization.  Ensure that the
2844b169a6bSchristos	ctf_str_pending_ref set is empty before strtab finalization.
2854b169a6bSchristos	(ctf_emit_type_sect): Add a ref to the ctt_name.
2864b169a6bSchristos	* ctf-create.c (ctf_add_generic): Add the ctt_name as a pending
2874b169a6bSchristos	ref.
2884b169a6bSchristos	* testsuite/libctf-writable/reserialize-strtab-corruption.*: New test.
2898dffb485Schristos
2904b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
2918dffb485Schristos
2924b169a6bSchristos	* ctf-serialize.c (ctf_serialize): Preserve ctf_typemax across
2934b169a6bSchristos	serialization.
2948dffb485Schristos
2954b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
2964b169a6bSchristos
2974b169a6bSchristos	* ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_argv>: Remove.
2984b169a6bSchristos	* ctf-create.c (ctf_dtd_delete): No longer free it.
2994b169a6bSchristos	(ctf_add_function): Use the dtd_vlen, not dtu_argv.  Properly align.
3004b169a6bSchristos	* ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
3014b169a6bSchristos	* ctf-types.c (ctf_func_type_info): Just use the vlen.
3024b169a6bSchristos	(ctf_func_type_args): Likewise.
3034b169a6bSchristos
3044b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3054b169a6bSchristos
3064b169a6bSchristos	* ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_arr>: Remove.
3074b169a6bSchristos	* ctf-create.c (ctf_add_array): Use the dtd_vlen, not dtu_arr.
3084b169a6bSchristos	(ctf_set_array): Likewise.
3094b169a6bSchristos	* ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
3104b169a6bSchristos	* ctf-types.c (ctf_array_info): Just use the vlen.
3114b169a6bSchristos
3124b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3134b169a6bSchristos
3144b169a6bSchristos	* ctf-impl.h (ctf_dtdef_t) <dtd_u.dtu_enc>: Remove.
3154b169a6bSchristos	<dtd_u.dtu_slice>: Likewise.
3164b169a6bSchristos	<dtd_vlen>: New.
3174b169a6bSchristos	* ctf-create.c (ctf_add_generic): Perhaps allocate it.  All
3184b169a6bSchristos	callers adjusted.
3194b169a6bSchristos	(ctf_dtd_delete): Free it.
3204b169a6bSchristos	(ctf_add_slice): Use the dtd_vlen, not dtu_enc.
3214b169a6bSchristos	(ctf_add_encoded): Likewise.  Assert that this must be an int or
3224b169a6bSchristos	float.
3234b169a6bSchristos	* ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen.
3244b169a6bSchristos	* ctf-dedup.c (ctf_dedup_rhash_type): Use the dtd_vlen, not
3254b169a6bSchristos	dtu_slice.
3264b169a6bSchristos	* ctf-types.c (ctf_type_reference): Likewise.
3274b169a6bSchristos	(ctf_type_encoding): Remove most dynamic-type-specific code: just
3284b169a6bSchristos	get the vlen from the right place.  Report failure to look up the
3294b169a6bSchristos	underlying type's encoding.
3304b169a6bSchristos
3314b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3324b169a6bSchristos
3334b169a6bSchristos	* ctf-archive.c (ctf_archive_next): GNU style fix for do {} while.
3344b169a6bSchristos	* ctf-dedup.c (ctf_dedup_rhash_type): Likewise.
3354b169a6bSchristos	(ctf_dedup_rwalk_one_output_mapping): Likewise.
3364b169a6bSchristos	* ctf-dump.c (ctf_dump_format_type): Likewise.
3374b169a6bSchristos	* ctf-lookup.c (ctf_symbol_next): Likewise.
3384b169a6bSchristos	* swap.h (swap_thing): Likewise.
3394b169a6bSchristos
3404b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3414b169a6bSchristos
3424b169a6bSchristos	* ctf-serialize.c: General reshuffling, and...
3434b169a6bSchristos	(emit_symtypetab_state_t): New, migrated from
3444b169a6bSchristos	local variables in ctf_serialize.
3454b169a6bSchristos	(ctf_serialize): Split out most section sizing and
3464b169a6bSchristos	emission.
3474b169a6bSchristos	(ctf_symtypetab_sect_sizes): New (split out).
3484b169a6bSchristos	(ctf_emit_symtypetab_sects): Likewise.
3494b169a6bSchristos	(ctf_type_sect_size): Likewise.
3504b169a6bSchristos	(ctf_emit_type_sect): Likewise.
3514b169a6bSchristos
3524b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3534b169a6bSchristos
3544b169a6bSchristos	* ctf-impl.h (ctf_dict_t): Fix comment.
3554b169a6bSchristos
3564b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3574b169a6bSchristos
3584b169a6bSchristos	* ctf-create.c (symtypetab_delete_nonstatic_vars): Move
3594b169a6bSchristos	into ctf-serialize.c.
3604b169a6bSchristos	(ctf_symtab_skippable): Likewise.
3614b169a6bSchristos	(CTF_SYMTYPETAB_EMIT_FUNCTION): Likewise.
3624b169a6bSchristos	(CTF_SYMTYPETAB_EMIT_PAD): Likewise.
3634b169a6bSchristos	(CTF_SYMTYPETAB_FORCE_INDEXED): Likewise.
3644b169a6bSchristos	(symtypetab_density): Likewise.
3654b169a6bSchristos	(emit_symtypetab): Likewise.
3664b169a6bSchristos	(emit_symtypetab_index): Likewise.
3674b169a6bSchristos	(ctf_copy_smembers): Likewise.
3684b169a6bSchristos	(ctf_copy_lmembers): Likewise.
3694b169a6bSchristos	(ctf_copy_emembers): Likewise.
3704b169a6bSchristos	(ctf_sort_var): Likewise.
3714b169a6bSchristos	(ctf_serialize): Likewise.
3724b169a6bSchristos	(ctf_gzwrite): Likewise.
3734b169a6bSchristos	(ctf_compress_write): Likewise.
3744b169a6bSchristos	(ctf_write_mem): Likewise.
3754b169a6bSchristos	(ctf_write): Likewise.
3764b169a6bSchristos	* ctf-serialize.c: New file.
3774b169a6bSchristos	* Makefile.am (libctf_nobfd_la_SOURCES): Add it.
3784b169a6bSchristos	* Makefile.in: Regenerate.
3794b169a6bSchristos
3804b169a6bSchristos2021-03-18  Nick Alcock  <nick.alcock@oracle.com>
3814b169a6bSchristos
3824b169a6bSchristos	* ctf-link.c (ctf_link_lazy_open): Move up in the file, to near
3834b169a6bSchristos	ctf_link_add_ctf.
3844b169a6bSchristos	* ctf-lookup.c (ctf_lookup_symbol_idx): Repair tabdamage.
3854b169a6bSchristos	(ctf_lookup_by_sym_or_name): Likewise.
3864b169a6bSchristos	* testsuite/libctf-lookup/struct-iteration.c: Likewise.
3874b169a6bSchristos	* testsuite/libctf-regression/type-add-unnamed-struct.c: Likewise.
3884b169a6bSchristos
3894b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
3904b169a6bSchristos
3914b169a6bSchristos	* ctf-create.c (symtypetab_density): Report the symbol name as
3924b169a6bSchristos	well as index in the name != object error; note the likely
3934b169a6bSchristos	consequences.
3944b169a6bSchristos	* ctf-link.c (ctf_link_shuffle_syms): Report the symbol index
3954b169a6bSchristos	as well as name.
3964b169a6bSchristos
3974b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
3984b169a6bSchristos
3994b169a6bSchristos	* ctf-link.c (ctf_link_shuffle_syms): Free ctf_dynsyms properly.
4004b169a6bSchristos
4014b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4024b169a6bSchristos
4034b169a6bSchristos	* ctf-dump.c (ctf_dump_format_type): Fix signed/unsigned confusion.
4044b169a6bSchristos
4054b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4064b169a6bSchristos
4074b169a6bSchristos	* ctf-dedup.c (ctf_dedup): Pass on errors from ctf_dedup_hash_type.
4084b169a6bSchristos	Call ctf_dedup_fini properly on other errors.
4094b169a6bSchristos	(ctf_dedup_emit_type): Set the errno on dynhash insertion failure.
4104b169a6bSchristos	* ctf-link.c (ctf_link_deduplicating_per_cu): Close outputs beyond
4114b169a6bSchristos	output 0 when asserting because >1 output is found.
4124b169a6bSchristos	(ctf_link_deduplicating): Likewise, when asserting because the
4134b169a6bSchristos	shared output is not the same as the passed-in fp.
4144b169a6bSchristos
4154b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4164b169a6bSchristos
4174b169a6bSchristos	* ctf-impl.h (ctf_dict_t) <ctf_link_type_mapping>: No longer used
4184b169a6bSchristos	by the nondeduplicating linker.
4194b169a6bSchristos	(ctf_add_type_mapping): Removed, now static.
4204b169a6bSchristos	(ctf_type_mapping): Likewise.
4214b169a6bSchristos	(ctf_dedup_type_mapping): New.
4224b169a6bSchristos	(ctf_dedup_t) <cd_input_nums>: New.
4234b169a6bSchristos	* ctf-dedup.c (ctf_dedup_init): Populate it.
4244b169a6bSchristos	(ctf_dedup_fini): Free it again.  Emphasise that this has to be
4254b169a6bSchristos	the last thing called.
4264b169a6bSchristos	(ctf_dedup): Populate it.
4274b169a6bSchristos	(ctf_dedup_populate_type_mapping): Removed.
4284b169a6bSchristos	(ctf_dedup_populate_type_mappings): Likewise.
4294b169a6bSchristos	(ctf_dedup_emit): No longer call it.  No longer call
4304b169a6bSchristos	ctf_dedup_fini either.
4314b169a6bSchristos	(ctf_dedup_type_mapping): New.
4324b169a6bSchristos	* ctf-link.c (ctf_unnamed_cuname): New.
4334b169a6bSchristos	(ctf_create_per_cu): Arguments must be non-null now.
4344b169a6bSchristos	(ctf_in_member_cb_arg): Removed.
4354b169a6bSchristos	(ctf_link): No longer populate it.  No longer discard the
4364b169a6bSchristos	mapping table.
4374b169a6bSchristos	(ctf_link_deduplicating_one_symtypetab): Use
4384b169a6bSchristos	ctf_dedup_type_mapping, not ctf_type_mapping.  Use
4394b169a6bSchristos	ctf_unnamed_cuname.
4404b169a6bSchristos	(ctf_link_one_variable): Likewise.  Pass in args individually: no
4414b169a6bSchristos	longer a ctf_variable_iter callback.
4424b169a6bSchristos	(empty_link_type_mapping): Removed.
4434b169a6bSchristos	(ctf_link_deduplicating_variables): Use ctf_variable_next, not
4444b169a6bSchristos	ctf_variable_iter.  No longer pack arguments to
4454b169a6bSchristos	ctf_link_one_variable into a struct.
4464b169a6bSchristos	(ctf_link_deduplicating_per_cu): Call ctf_dedup_fini once
4474b169a6bSchristos	all link phases are done.
4484b169a6bSchristos	(ctf_link_deduplicating): Likewise.
4494b169a6bSchristos	(ctf_link_intern_extern_string): Improve comment.
4504b169a6bSchristos	(ctf_add_type_mapping): Migrate...
4514b169a6bSchristos	(ctf_type_mapping): ... these functions...
4524b169a6bSchristos	* ctf-create.c (ctf_add_type_mapping): ... here...
4534b169a6bSchristos	(ctf_type_mapping): ... and make static, for the sole use of
4544b169a6bSchristos	ctf_add_type.
4554b169a6bSchristos
4564b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4574b169a6bSchristos
4584b169a6bSchristos	* ctf-link.c (ctf_link_one_variable): Remove reference to
4594b169a6bSchristos	"unconflicted link mode".
4604b169a6bSchristos
4614b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4624b169a6bSchristos
4634b169a6bSchristos	* ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is
4644b169a6bSchristos	always identical to CUNAME.
4654b169a6bSchristos	(ctf_link_deduplicating_one_symtypetab): Adjust.
4664b169a6bSchristos	(ctf_link_one_type): Remove.
4674b169a6bSchristos	(ctf_link_one_input_archive_member): Likewise.
4684b169a6bSchristos	(ctf_link_close_one_input_archive): Likewise.
4694b169a6bSchristos	(ctf_link_one_input_archive): Likewise.
4704b169a6bSchristos	(ctf_link): No longer call it.  Drop CTF_LINK_NONDEDUP path.
4714b169a6bSchristos	Improve header comment a bit (dicts, not files).  Adjust
4724b169a6bSchristos	ctf_create_per_cu call.
4734b169a6bSchristos	(ctf_link_deduplicating_variables): Simplify.
4744b169a6bSchristos	(ctf_link_in_member_cb_arg_t) <cu_name>: Remove.
4754b169a6bSchristos	<in_input_cu_file>: Likewise.
4764b169a6bSchristos	<in_fp_parent>: Likewise.
4774b169a6bSchristos	<done_parent>: Likewise.
4784b169a6bSchristos	(ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
4794b169a6bSchristos
4804b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4814b169a6bSchristos
4824b169a6bSchristos	* ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope.
4834b169a6bSchristos	(ctf_enum_iter): Reimplement in terms of ctf_enum_next.
4844b169a6bSchristos	(ctf_type_iter): Reimplement in terms of ctf_type_next.
4854b169a6bSchristos	(ctf_type_iter_all): Likewise.
4864b169a6bSchristos	(ctf_variable_iter): Reimplement in terms of ctf_variable_next.
4874b169a6bSchristos	* ctf-archive.c (ctf_archive_iter_internal): Remove.
4884b169a6bSchristos	(ctf_archive_iter): Reimplement in terms of ctf_archive_next.
4894b169a6bSchristos
4904b169a6bSchristos2021-03-02  Nick Alcock  <nick.alcock@oracle.com>
4914b169a6bSchristos
4924b169a6bSchristos	* ctf-archive.c (ctf_archive_next): Set the name of parents in
4934b169a6bSchristos	single-member archives.
4944b169a6bSchristos
4954b169a6bSchristos2021-02-26  Alan Modra  <amodra@gmail.com>
4964b169a6bSchristos
4974b169a6bSchristos	* Makefile.in: Regenerate.
4984b169a6bSchristos
4994b169a6bSchristos2021-02-21  Alan Modra  <amodra@gmail.com>
5004b169a6bSchristos
5014b169a6bSchristos	* configure.ac: Invoke AC_CANONICAL_TARGET, AC_CANONICAL_HOST
5024b169a6bSchristos	and AC_CANONICAL_BUILD.
5034b169a6bSchristos	* configure: Regenerate.
5044b169a6bSchristos	* Makefile.in: Regenerate.
5054b169a6bSchristos
5064b169a6bSchristos2021-02-20  Nick Alcock  <nick.alcock@oracle.com>
5074b169a6bSchristos
5084b169a6bSchristos	* ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
5094b169a6bSchristos	<ctf_symhash_latest>: Likewise.
5104b169a6bSchristos	(struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
5114b169a6bSchristos	<ctfi_symnamedicts>: New.
5124b169a6bSchristos	<ctfi_syms>: Remove.
5134b169a6bSchristos	(ctf_lookup_symbol_name): Remove.
5144b169a6bSchristos	* ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
5154b169a6bSchristos	parent properly.  Make static.
5164b169a6bSchristos	(ctf_lookup_symbol_idx): New, linear search for the symbol name,
5174b169a6bSchristos	cached in the crossdict cache's ctf_symhash (if available), or
5184b169a6bSchristos	this dict's (otherwise).
5194b169a6bSchristos	(ctf_try_lookup_indexed): Allow the symname to be passed in.
5204b169a6bSchristos	(ctf_lookup_by_symbol): Turn into a wrapper around...
5214b169a6bSchristos	(ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
5224b169a6bSchristos	using ctf_lookup_symbol_idx in non-writable dicts.  Special-case
5234b169a6bSchristos	name lookup in dynamic dicts without reported symbols, which have
5244b169a6bSchristos	no symtab or dynsymidx but where name lookup should still work.
5254b169a6bSchristos	(ctf_lookup_by_symbol_name): New, another wrapper.
5264b169a6bSchristos	* ctf-archive.c (enosym): Note that this is present in
5274b169a6bSchristos	ctfi_symnamedicts too.
5284b169a6bSchristos	(ctf_arc_close): Adjust for removal of ctfi_syms.  Free the
5294b169a6bSchristos	ctfi_symnamedicts.
5304b169a6bSchristos	(ctf_arc_flush_caches): Likewise.
5314b169a6bSchristos	(ctf_dict_open_cached): Memoize the first cached dict in the
5324b169a6bSchristos	crossdict cache.
5334b169a6bSchristos	(ctf_arc_lookup_symbol): Turn into a wrapper around...
5344b169a6bSchristos	(ctf_arc_lookup_sym_or_name): ... this.  No longer cache
5354b169a6bSchristos	ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
5364b169a6bSchristos	still cache the dicts those lookups succeed in).  Add
5374b169a6bSchristos	lookup-by-name support, with dicts of successful lookups cached in
5384b169a6bSchristos	ctfi_symnamedicts.  Refactor the caching code a bit.
5394b169a6bSchristos	(ctf_arc_lookup_symbol_name): New, another wrapper.
5404b169a6bSchristos	* ctf-open.c (ctf_dict_close): Free the ctf_symhash.
5414b169a6bSchristos	* libctf.ver (LIBCTF_1.2): New version.  Add
5424b169a6bSchristos	ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
5434b169a6bSchristos	* testsuite/libctf-lookup/enum-symbol.c (main): Use
5444b169a6bSchristos	ctf_arc_lookup_symbol rather than looking up the name ourselves.
5454b169a6bSchristos	Fish it out repeatedly, to make sure that symbol caching isn't
5464b169a6bSchristos	broken.
5474b169a6bSchristos	(symidx_64): Remove.
5484b169a6bSchristos	(symidx_32): Remove.
5494b169a6bSchristos	* testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
5504b169a6bSchristos	in an unlinked object file (indexed symtypetab sections only).
5514b169a6bSchristos	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
5524b169a6bSchristos	(try_maybe_reporting): Check symbol types via
5534b169a6bSchristos	ctf_lookup_by_symbol_name as well as ctf_symbol_next.
5544b169a6bSchristos	* testsuite/libctf-lookup/conflicting-type-syms.*: New test of
5554b169a6bSchristos	lookups in a multi-dict archive.
5564b169a6bSchristos
5574b169a6bSchristos2021-02-20  Alan Modra  <amodra@gmail.com>
5584b169a6bSchristos
5594b169a6bSchristos	* testsuite/config/default.exp (ld_L_opt): Define.
5604b169a6bSchristos	* testsuite/lib/ctf-lib.exp (load_common_lib): Delete.  Instead load
5614b169a6bSchristos	ld-lib.exp.
5624b169a6bSchristos	(run_host_cmd, run_host_cmd_yesno, check_compiler_available): Delete.
5634b169a6bSchristos	(compile_one_cc, check_ctf_available): Delete.
5644b169a6bSchristos
5654b169a6bSchristos2021-02-03  Nick Alcock  <nick.alcock@oracle.com>
5664b169a6bSchristos
5674b169a6bSchristos	* configure.ac (ac_cv_libctf_bfd_elf): Include string.h.
5684b169a6bSchristos	* configure: Regenerated.
5694b169a6bSchristos
5704b169a6bSchristos2021-02-03  Nick Alcock  <nick.alcock@oracle.com>
5714b169a6bSchristos
5724b169a6bSchristos	* configure.ac (EXPECT): Check for, in order to define...
5734b169a6bSchristos	(TCL_TRY): ... this, if Tcl supports try/catch.
5744b169a6bSchristos	* Makefile.am (TCL_TRY): Run the testsuite only if set.
5754b169a6bSchristos	* configure: Regenerated.
5764b169a6bSchristos	* Makefile.in: Likewise.
5774b169a6bSchristos
5784b169a6bSchristos2021-02-02  Nick Alcock  <nick.alcock@oracle.com>
5794b169a6bSchristos
5804b169a6bSchristos	* configure.ac (CTF_LIBADD): Remove explicit -lintl population in
5814b169a6bSchristos	favour of LIBINTL.
5824b169a6bSchristos	* Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
5834b169a6bSchristos	include $(LIBINTL).
5844b169a6bSchristos	(check-DEJAGNU): Pass down to tests as well.
5854b169a6bSchristos	* configure: Regenerated.
5864b169a6bSchristos	* Makefile.in: Likewise.
5874b169a6bSchristos
5884b169a6bSchristos2021-01-27  Nick Alcock  <nick.alcock@oracle.com>
5894b169a6bSchristos
5904b169a6bSchristos	* ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
5914b169a6bSchristos	(ctf_str_add_ref): Likewise.
5924b169a6bSchristos	(ctf_str_add_external): Likewise.
5934b169a6bSchristos	* ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
5944b169a6bSchristos	* ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
5954b169a6bSchristos	against NULL name.
5964b169a6bSchristos	(ctf_dedup_maybe_synthesize_forward): Likewise.
5974b169a6bSchristos
5984b169a6bSchristos2021-01-27  Nick Alcock  <nick.alcock@oracle.com>
5994b169a6bSchristos
6004b169a6bSchristos	* ctf-create.c (ctf_serialize): Fix shadowing.
6014b169a6bSchristos
6024b169a6bSchristos2021-01-27  Nick Alcock  <nick.alcock@oracle.com>
6034b169a6bSchristos
6044b169a6bSchristos	* ctf-create.c (ctf_add_encoded): Add check for non-empty name.
6054b169a6bSchristos	(ctf_add_forward): Likewise.
6064b169a6bSchristos	(ctf_add_typedef): Likewise.
6074b169a6bSchristos
6084b169a6bSchristos2021-01-27  Nick Alcock  <nick.alcock@oracle.com>
6094b169a6bSchristos
6104b169a6bSchristos	* ctf-open.c (init_types): Rip out code to check anonymous typedef
6114b169a6bSchristos	nodes.
6124b169a6bSchristos	* ctf-create.c (ctf_add_reftype): Likewise.
6134b169a6bSchristos	* ctf-lookup.c (refresh_pptrtab): Likewise.
6144b169a6bSchristos
6154b169a6bSchristos2021-01-27  Nick Alcock  <nick.alcock@oracle.com>
6164b169a6bSchristos
6174b169a6bSchristos	* ctf-impl.c (_libctf_nonnull_): Add parameters.
6184b169a6bSchristos	(LCTF_LINKING): New flag.
6194b169a6bSchristos	(ctf_dict_t) <ctf_link_flags>: Mention it.
6204b169a6bSchristos	* ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
6214b169a6bSchristos	(ctf_write): Likewise, including in child dictionaries.
6224b169a6bSchristos	(ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
6234b169a6bSchristos	are no reported symbols.
6244b169a6bSchristos	* ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
6254b169a6bSchristos	the variable has been reported as a symbol by the linker.
6264b169a6bSchristos	(symtypetab_skippable): Mention relationship between SYMFP and the
6274b169a6bSchristos	flags.
6284b169a6bSchristos	(symtypetab_density): Adjust nonnullity.  Exit early if no symbols
6294b169a6bSchristos	were reported and force-indexing is off (i.e., we are doing a
6304b169a6bSchristos	final link).
6314b169a6bSchristos	(ctf_serialize): Handle the !LCTF_LINKING case by writing out an
6324b169a6bSchristos	indexed, sorted symtypetab (and allow SYMFP to be NULL in this
6334b169a6bSchristos	case).  Turn sorting off if this is a non-final link.  Only delete
6344b169a6bSchristos	nonstatic vars if we are filtering symbols and the linker has
6354b169a6bSchristos	reported some.
6364b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld-r*:
6374b169a6bSchristos	New test of variable and symtypetab section population when
6384b169a6bSchristos	ld -r is used.
6394b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
6404b169a6bSchristos	Likewise, when ld of an executable is used.
6414b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld.lk:
6424b169a6bSchristos	Likewise, when ld -shared alone is used.
6434b169a6bSchristos	* testsuite/libctf-regression/nonstatic-var-section-ld*.c:
6444b169a6bSchristos	Lookup programs for the above.
6454b169a6bSchristos	* testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
6464b169a6bSchristos	test, testing survival of symbols across ctf_write paths.
6474b169a6bSchristos	* testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
6484b169a6bSchristos	nonshared, suppressing linking of the SOURCE with -shared.
6494b169a6bSchristos
6504b169a6bSchristos2021-01-19  Nick Alcock  <nick.alcock@oracle.com>
6514b169a6bSchristos
6524b169a6bSchristos	* ctf-create.c (membadd): Transform ""-named members into
6534b169a6bSchristos	NULL-named ones.
6544b169a6bSchristos	* testsuite/libctf-regression/type-add-unnamed-struct*: New test.
6554b169a6bSchristos
6564b169a6bSchristos2021-01-19  Nick Alcock  <nick.alcock@oracle.com>
6574b169a6bSchristos
6584b169a6bSchristos	* ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
6594b169a6bSchristos	base type if looking up a nonexistent pointer type.
6604b169a6bSchristos	* testsuite/libctf-regression/pptrtab*: Test it.
6614b169a6bSchristos
6624b169a6bSchristos2021-01-13  Alan Modra  <amodra@gmail.com>
6634b169a6bSchristos
6644b169a6bSchristos	* Makefile.in: Regenerate.
6654b169a6bSchristos
6664b169a6bSchristos2021-01-12  H.J. Lu  <hongjiu.lu@intel.com>
6674b169a6bSchristos
6684b169a6bSchristos	PR binutils/26792
6694b169a6bSchristos	* configure.ac: Use GNU_MAKE_JOBSERVER.
6704b169a6bSchristos	* aclocal.m4: Regenerated.
6714b169a6bSchristos	* configure: Likewise.
6724b169a6bSchristos
6734b169a6bSchristos2021-01-11  H.J. Lu  <hongjiu.lu@intel.com>
6744b169a6bSchristos
6754b169a6bSchristos	PR ld/27173
6764b169a6bSchristos	* configure: Regenerated.
6774b169a6bSchristos
6784b169a6bSchristos2021-01-09  H.J. Lu  <hongjiu.lu@intel.com>
6794b169a6bSchristos
6804b169a6bSchristos	* configure: Regenerated.
6814b169a6bSchristos
6824b169a6bSchristos2021-01-09  Nick Clifton  <nickc@redhat.com>
6834b169a6bSchristos
6844b169a6bSchristos	* 2.36 release branch crated.
6854b169a6bSchristos
6864b169a6bSchristos2021-01-09  Alan Modra  <amodra@gmail.com>
6874b169a6bSchristos
6884b169a6bSchristos	* configure: Regenerate.
6894b169a6bSchristos
6904b169a6bSchristos2021-01-07  Samuel Thibault  <samuel.thibault@gnu.org>
6914b169a6bSchristos
6924b169a6bSchristos	* configure: Regenerate.
6934b169a6bSchristos
6944b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
6954b169a6bSchristos
6964b169a6bSchristos	* testsuite/libctf-lookup/struct-iteration.c (main):
6974b169a6bSchristos	ctf_member_count returns an int.
6984b169a6bSchristos
6994b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7004b169a6bSchristos
7014b169a6bSchristos	* Makefile.am (BASEDIR): New.
7024b169a6bSchristos	(BFDDIR): Likewise.
7034b169a6bSchristos	(check-DEJAGNU): Add development.exp to prerequisites.
7044b169a6bSchristos	(development.exp): New.
7054b169a6bSchristos	(CONFIG_STATUS_DEPENDENCIES): New.
7064b169a6bSchristos	(EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
7074b169a6bSchristos	(DISTCLEANFILES): Likewise.
7084b169a6bSchristos	* Makefile.in: Regenerated.
7094b169a6bSchristos	* testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
7104b169a6bSchristos	* testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
7114b169a6bSchristos	* testsuite/libctf-regression/regression.exp: Likewise.
7124b169a6bSchristos
7134b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7144b169a6bSchristos
7154b169a6bSchristos	* ctf-types.c (ctf_type_aname): Print forwards to unions and enums
7164b169a6bSchristos	properly.
7174b169a6bSchristos
7184b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7194b169a6bSchristos
7204b169a6bSchristos	* ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
7214b169a6bSchristos	<ctf_pptrtab_len>: New.
7224b169a6bSchristos	<ctf_pptrtab_typemax>: New.
7234b169a6bSchristos	* ctf-create.c (ctf_serialize): Update accordingly.
7244b169a6bSchristos	(ctf_add_reftype): Note that we don't need to update pptrtab here,
7254b169a6bSchristos	despite updating ptrtab.
7264b169a6bSchristos	* ctf-open.c (ctf_dict_close): Destroy the pptrtab.
7274b169a6bSchristos	(ctf_import): Likewise.
7284b169a6bSchristos	(ctf_import_unref): Likewise.
7294b169a6bSchristos	* ctf-lookup.c (grow_pptrtab): New.
7304b169a6bSchristos	(refresh_pptrtab): New, update a pptrtab.
7314b169a6bSchristos	(ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
7324b169a6bSchristos	(ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
7334b169a6bSchristos	use it in addition to the parent's ptrtab when parent dicts are
7344b169a6bSchristos	searched.
7354b169a6bSchristos	* testsuite/libctf-regression/regression.exp: New testsuite for
7364b169a6bSchristos	regression tests.
7374b169a6bSchristos	* testsuite/libctf-regression/pptrtab*: New test.
7384b169a6bSchristos	* testsuite/libctf-writable/writable.exp: New testsuite for tests of
7394b169a6bSchristos	writable CTF dicts.
7404b169a6bSchristos	* testsuite/libctf-writable/pptrtab*: New test.
7414b169a6bSchristos
7424b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7434b169a6bSchristos
7444b169a6bSchristos	* ctf-archive.c (ctf_archive_iter): Remove outdated comment.
7454b169a6bSchristos
7464b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7474b169a6bSchristos
7484b169a6bSchristos	* ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
7494b169a6bSchristos	<ctn_next>: ... here.
7504b169a6bSchristos	* ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
7514b169a6bSchristos	* ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
7524b169a6bSchristos	* ctf-types.c (ctf_member_iter): Reimplement in terms of...
7534b169a6bSchristos	(ctf_member_next): ... this.  Support recursive unnamed member
7544b169a6bSchristos	iteration (off by default).
7554b169a6bSchristos	(ctf_member_info): Look up members in unnamed sub-structs.
7564b169a6bSchristos	* ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
7574b169a6bSchristos	(ctf_dedup_emit_struct_members): Likewise.
7584b169a6bSchristos	* testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
7594b169a6bSchristos	members, and a normal member after the end.
7604b169a6bSchristos	* testsuite/libctf-lookup/struct-iteration.c: Verify that
7614b169a6bSchristos	ctf_member_count is consistent with the number of successful returns
7624b169a6bSchristos	from a non-recursive ctf_member_next.
7634b169a6bSchristos	* testsuite/libctf-lookup/struct-iteration-*: New, test iteration
7644b169a6bSchristos	over struct members.
7654b169a6bSchristos	* testsuite/libctf-lookup/struct-lookup.c: New test.
7664b169a6bSchristos	* testsuite/libctf-lookup/struct-lookup.lk: New test.
7674b169a6bSchristos
7684b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7694b169a6bSchristos
7704b169a6bSchristos	* ctf-link.c (ctf_link_warn_outdated_inputs): New.
7714b169a6bSchristos	(ctf_link_write): Call it.
7724b169a6bSchristos
7734b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7744b169a6bSchristos
7754b169a6bSchristos	* testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
7764b169a6bSchristos	* testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
7774b169a6bSchristos	* testsuite/libctf-lookup/enum-symbol.c: New lookup test.
7784b169a6bSchristos
7794b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7804b169a6bSchristos
7814b169a6bSchristos	* Makefile.am (EXPECT): New.
7824b169a6bSchristos	(RUNTEST): Likewise.
7834b169a6bSchristos	(RUNTESTFLAGS): Likewise.
7844b169a6bSchristos	(CC_FOR_TARGET): Likewise.
7854b169a6bSchristos	(check-DEJAGNU): Likewise.
7864b169a6bSchristos	(AUTOMAKE_OPTIONS): Add dejagnu.
7874b169a6bSchristos	* Makefile.in: Regenerated.
7884b169a6bSchristos	* testsuite/config/default.exp: New.
7894b169a6bSchristos	* testsuite/lib/ctf-lib.exp: Likewise.
7904b169a6bSchristos	* testsuite/libctf-lookup/enum.lk: New test.
7914b169a6bSchristos	* testsuite/libctf-lookup/enum-ctf.c: New CTF input.
7924b169a6bSchristos	* testsuite/libctf-lookup/enum.c: New lookup test.
7934b169a6bSchristos	* testsuite/libctf-lookup/ambiguous-struct*.c: New test.
7944b169a6bSchristos	* testsuite/libctf-lookup/lookup.exp: New.
7954b169a6bSchristos
7964b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
7974b169a6bSchristos
7984b169a6bSchristos	* configure.ac (BFD_LIBADD): Remove.
7994b169a6bSchristos	(BFD_DEPENDENCIES): Likewise. Remove associated cases.
8004b169a6bSchristos	(SHARED_LIBADD): Rename to...
8014b169a6bSchristos	(CTF_LIBADD): ... this.  Stick in a suitable libiberty even when
8024b169a6bSchristos	linking statically.
8034b169a6bSchristos	* Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
8044b169a6bSchristos	libctf uses libintl.
8054b169a6bSchristos	(libctf_la_LIBADD): Reference libbfd.la directly, not via
8064b169a6bSchristos	BFD_LIBADD.
8074b169a6bSchristos	(libctf_la_DEPENDENCIES): Remove.
8084b169a6bSchristos	* Makefile.in: Regenerate.
8094b169a6bSchristos	* configure: Likewise.
8104b169a6bSchristos
8114b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
8124b169a6bSchristos
8134b169a6bSchristos	* ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
8144b169a6bSchristos	* ctf-types.c (ctf_type_aname): No longer deal with slices here.
8154b169a6bSchristos	* ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
8164b169a6bSchristos	(CTF_FT_REFS): New.
8174b169a6bSchristos	(CTF_FT_BITFIELD): Likewise.
8184b169a6bSchristos	(CTF_FT_ID): Likewise.
8194b169a6bSchristos	(ctf_dump_member): Do not do indentation here. Migrate the
8204b169a6bSchristos	type-printing parts of this into...
8214b169a6bSchristos	(ctf_dump_format_type): ... here, to be shared by all type printers.
8224b169a6bSchristos	Get the errno value for non-representable types right.  Do not print
8234b169a6bSchristos	bitfield info for non-bitfields.  Improve the format and indentation
8244b169a6bSchristos	of other type output.  Shuffle spacing around to make all indentation
8254b169a6bSchristos	either 'width of column' or 4 chars.
8264b169a6bSchristos	(ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
8274b169a6bSchristos	(ctf_dump_objts): Likewise.  Spacing shuffle.
8284b169a6bSchristos	(ctf_dump_var): Likewise.
8294b169a6bSchristos	(type_hex_digits): Migrate down in the file, to above its new user.
8304b169a6bSchristos	(ctf_dump_type): Indent here instead.  Pass CTF_FT_REFS to
8314b169a6bSchristos	ctf_dump_format_type. Don't trim off excess linefeeds now we no
8324b169a6bSchristos	longer generate them.  Dump enumerated types.
8334b169a6bSchristos
8344b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
8354b169a6bSchristos
8364b169a6bSchristos	* ctf-types.c (ctf_type_resolve): Improve comment.
8374b169a6bSchristos	(ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
8384b169a6bSchristos	Emit errors into the right dict.
8394b169a6bSchristos	(ctf_type_align): Likewise.
8404b169a6bSchristos	* ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
8414b169a6bSchristos	when adding a member without explicit offset when this member, or
8424b169a6bSchristos	the previous member, is incomplete.
8434b169a6bSchristos	* ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
8444b169a6bSchristos	forwards.
8454b169a6bSchristos	(ctf_dump_member): Do not try to print their alignment.
8464b169a6bSchristos
8474b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
8484b169a6bSchristos
8494b169a6bSchristos	* ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
8504b169a6bSchristos	(ctf_dump_format_type): Don't emit the size for function objects.
8514b169a6bSchristos	Dump the element type of arrays like we dump the pointed-to type of
8524b169a6bSchristos	pointers, etc.
8534b169a6bSchristos
8544b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
8554b169a6bSchristos
8564b169a6bSchristos	* ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
8574b169a6bSchristos	(ctf_dump_header): Add 0x to the hex magic number.
8584b169a6bSchristos	(ctf_dump_str): Add 0x to the hex string offsets.
8594b169a6bSchristos	(ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
8604b169a6bSchristos	(ctf_dump_type): Adjust.  Free it when we're done.
8614b169a6bSchristos	(type_hex_digits): New.
8624b169a6bSchristos	(ctf_dump_member): Align output depending on the width of the type
8634b169a6bSchristos	ID being generated.  Use printf padding, not a loop, to generate
8644b169a6bSchristos	indentation.
8654b169a6bSchristos
8664b169a6bSchristos2021-01-05  Nick Alcock  <nick.alcock@oracle.com>
8674b169a6bSchristos
8684b169a6bSchristos	* ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
8694b169a6bSchristos
8704b169a6bSchristos2021-01-04  Nicolas Boulenguez  <nicolas@debian.org>
8714b169a6bSchristos
8724b169a6bSchristos	PR 27117
8734b169a6bSchristos	* configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
8744b169a6bSchristos	ACLOCAL_AMFLAGS -I dirs.
8754b169a6bSchristos	* configure: Regenerate.
8764b169a6bSchristos
8774b169a6bSchristos2021-01-01  Alan Modra  <amodra@gmail.com>
8788dffb485Schristos
8798dffb485Schristos	Update year range in copyright notice of all files.
8808dffb485Schristos
8814b169a6bSchristosFor older changes see ChangeLog-2020
8828dffb485Schristos
883*12989c96SchristosCopyright (C) 2021-2024 Free Software Foundation, Inc.
8844b169a6bSchristos
8854b169a6bSchristosCopying and distribution of this file, with or without modification,
8864b169a6bSchristosare permitted in any medium without royalty provided the copyright
8874b169a6bSchristosnotice and this notice are preserved.
8884b169a6bSchristos
8898dffb485SchristosLocal Variables:
8908dffb485Schristosmode: change-log
8918dffb485Schristosleft-margin: 8
8924b169a6bSchristosfill-column: 74
8938dffb485Schristosversion-control: never
8948dffb485SchristosEnd:
895