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