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