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