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