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