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