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