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