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