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