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