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