]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - libctf/ChangeLog
libctf, include: remove the nondeduplicating CTF linker
[thirdparty/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
8915c559
NA
12021-03-02 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is
4 always identical to CUNAME.
5 (ctf_link_deduplicating_one_symtypetab): Adjust.
6 (ctf_link_one_type): Remove.
7 (ctf_link_one_input_archive_member): Likewise.
8 (ctf_link_close_one_input_archive): Likewise.
9 (ctf_link_one_input_archive): Likewise.
10 (ctf_link): No longer call it. Drop CTF_LINK_NONDEDUP path.
11 Improve header comment a bit (dicts, not files). Adjust
12 ctf_create_per_cu call.
13 (ctf_link_deduplicating_variables): Simplify.
14 (ctf_link_in_member_cb_arg_t) <cu_name>: Remove.
15 <in_input_cu_file>: Likewise.
16 <in_fp_parent>: Likewise.
17 <done_parent>: Likewise.
18 (ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
19
ac36e134
NA
202021-03-02 Nick Alcock <nick.alcock@oracle.com>
21
22 * ctf-types.c (ctf_member_iter): Move 'rc' to an inner scope.
23 (ctf_enum_iter): Reimplement in terms of ctf_enum_next.
24 (ctf_type_iter): Reimplement in terms of ctf_type_next.
25 (ctf_type_iter_all): Likewise.
26 (ctf_variable_iter): Reimplement in terms of ctf_variable_next.
27 * ctf-archive.c (ctf_archive_iter_internal): Remove.
28 (ctf_archive_iter): Reimplement in terms of ctf_archive_next.
29
eaa2913a
NA
302021-03-02 Nick Alcock <nick.alcock@oracle.com>
31
32 * ctf-archive.c (ctf_archive_next): Set the name of parents in
33 single-member archives.
34
8255cf42
AM
352021-02-26 Alan Modra <amodra@gmail.com>
36
37 * Makefile.in: Regenerate.
38
93993f67
AM
392021-02-21 Alan Modra <amodra@gmail.com>
40
41 * configure.ac: Invoke AC_CANONICAL_TARGET, AC_CANONICAL_HOST
42 and AC_CANONICAL_BUILD.
43 * configure: Regenerate.
44 * Makefile.in: Regenerate.
45
fd126337 462021-02-20 Nick Alcock <nick.alcock@oracle.com>
f4f60336
NA
47
48 * ctf-impl.h (ctf_dict_t) <ctf_symhash>: New.
49 <ctf_symhash_latest>: Likewise.
50 (struct ctf_archive_internal) <ctfi_crossdict_cache>: New.
51 <ctfi_symnamedicts>: New.
52 <ctfi_syms>: Remove.
53 (ctf_lookup_symbol_name): Remove.
54 * ctf-lookup.c (ctf_lookup_symbol_name): Propagate errors from
55 parent properly. Make static.
56 (ctf_lookup_symbol_idx): New, linear search for the symbol name,
57 cached in the crossdict cache's ctf_symhash (if available), or
58 this dict's (otherwise).
59 (ctf_try_lookup_indexed): Allow the symname to be passed in.
60 (ctf_lookup_by_symbol): Turn into a wrapper around...
61 (ctf_lookup_by_sym_or_name): ... this, supporting name lookup too,
62 using ctf_lookup_symbol_idx in non-writable dicts. Special-case
63 name lookup in dynamic dicts without reported symbols, which have
64 no symtab or dynsymidx but where name lookup should still work.
65 (ctf_lookup_by_symbol_name): New, another wrapper.
66 * ctf-archive.c (enosym): Note that this is present in
67 ctfi_symnamedicts too.
68 (ctf_arc_close): Adjust for removal of ctfi_syms. Free the
69 ctfi_symnamedicts.
70 (ctf_arc_flush_caches): Likewise.
71 (ctf_dict_open_cached): Memoize the first cached dict in the
72 crossdict cache.
73 (ctf_arc_lookup_symbol): Turn into a wrapper around...
74 (ctf_arc_lookup_sym_or_name): ... this. No longer cache
75 ctf_id_t lookups: just call ctf_lookup_by_symbol as needed (but
76 still cache the dicts those lookups succeed in). Add
77 lookup-by-name support, with dicts of successful lookups cached in
78 ctfi_symnamedicts. Refactor the caching code a bit.
79 (ctf_arc_lookup_symbol_name): New, another wrapper.
80 * ctf-open.c (ctf_dict_close): Free the ctf_symhash.
81 * libctf.ver (LIBCTF_1.2): New version. Add
82 ctf_lookup_by_symbol_name, ctf_arc_lookup_symbol_name.
83 * testsuite/libctf-lookup/enum-symbol.c (main): Use
84 ctf_arc_lookup_symbol rather than looking up the name ourselves.
85 Fish it out repeatedly, to make sure that symbol caching isn't
86 broken.
87 (symidx_64): Remove.
88 (symidx_32): Remove.
89 * testsuite/libctf-lookup/enum-symbol-obj.lk: Test symbol lookup
90 in an unlinked object file (indexed symtypetab sections only).
91 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.c
92 (try_maybe_reporting): Check symbol types via
93 ctf_lookup_by_symbol_name as well as ctf_symbol_next.
94 * testsuite/libctf-lookup/conflicting-type-syms.*: New test of
95 lookups in a multi-dict archive.
96
c3bf9dc5
AM
972021-02-20 Alan Modra <amodra@gmail.com>
98
99 * testsuite/config/default.exp (ld_L_opt): Define.
100 * testsuite/lib/ctf-lib.exp (load_common_lib): Delete. Instead load
101 ld-lib.exp.
102 (run_host_cmd, run_host_cmd_yesno, check_compiler_available): Delete.
103 (compile_one_cc, check_ctf_available): Delete.
104
758f5907
NA
1052021-02-03 Nick Alcock <nick.alcock@oracle.com>
106
107 * configure.ac (ac_cv_libctf_bfd_elf): Include string.h.
108 * configure: Regenerated.
109
cbd8f5bb
NA
1102021-02-03 Nick Alcock <nick.alcock@oracle.com>
111
112 * configure.ac (EXPECT): Check for, in order to define...
113 (TCL_TRY): ... this, if Tcl supports try/catch.
114 * Makefile.am (TCL_TRY): Run the testsuite only if set.
115 * configure: Regenerated.
116 * Makefile.in: Likewise.
117
95148614
NA
1182021-02-02 Nick Alcock <nick.alcock@oracle.com>
119
120 * configure.ac (CTF_LIBADD): Remove explicit -lintl population in
121 favour of LIBINTL.
122 * Makefile.am (libctf_nobfd_la_LIBADD): No longer explicitly
123 include $(LIBINTL).
124 (check-DEJAGNU): Pass down to tests as well.
125 * configure: Regenerated.
126 * Makefile.in: Likewise.
127
ee87f50b
NA
1282021-01-27 Nick Alcock <nick.alcock@oracle.com>
129
130 * ctf-string.c (ctf_str_add): Treat adding a NULL as adding "".
131 (ctf_str_add_ref): Likewise.
132 (ctf_str_add_external): Likewise.
133 * ctf-types.c (ctf_type_name_raw): Always return "" for offset 0.
134 * ctf-dedup.c (ctf_dedup_multiple_input_dicts): Don't armour
135 against NULL name.
136 (ctf_dedup_maybe_synthesize_forward): Likewise.
137
5dacd11d
NA
1382021-01-27 Nick Alcock <nick.alcock@oracle.com>
139
140 * ctf-create.c (ctf_serialize): Fix shadowing.
141
caa17049
NA
1422021-01-27 Nick Alcock <nick.alcock@oracle.com>
143
144 * ctf-create.c (ctf_add_encoded): Add check for non-empty name.
145 (ctf_add_forward): Likewise.
146 (ctf_add_typedef): Likewise.
147
78f28b89
NA
1482021-01-27 Nick Alcock <nick.alcock@oracle.com>
149
150 * ctf-open.c (init_types): Rip out code to check anonymous typedef
151 nodes.
152 * ctf-create.c (ctf_add_reftype): Likewise.
153 * ctf-lookup.c (refresh_pptrtab): Likewise.
154
35a01a04
NA
1552021-01-27 Nick Alcock <nick.alcock@oracle.com>
156
157 * ctf-impl.c (_libctf_nonnull_): Add parameters.
158 (LCTF_LINKING): New flag.
159 (ctf_dict_t) <ctf_link_flags>: Mention it.
160 * ctf-link.c (ctf_link): Keep LCTF_LINKING set across call.
161 (ctf_write): Likewise, including in child dictionaries.
162 (ctf_link_shuffle_syms): Make sure ctf_dynsyms is NULL if there
163 are no reported symbols.
164 * ctf-create.c (symtypetab_delete_nonstatic_vars): Make sure
165 the variable has been reported as a symbol by the linker.
166 (symtypetab_skippable): Mention relationship between SYMFP and the
167 flags.
168 (symtypetab_density): Adjust nonnullity. Exit early if no symbols
169 were reported and force-indexing is off (i.e., we are doing a
170 final link).
171 (ctf_serialize): Handle the !LCTF_LINKING case by writing out an
172 indexed, sorted symtypetab (and allow SYMFP to be NULL in this
173 case). Turn sorting off if this is a non-final link. Only delete
174 nonstatic vars if we are filtering symbols and the linker has
175 reported some.
176 * testsuite/libctf-regression/nonstatic-var-section-ld-r*:
177 New test of variable and symtypetab section population when
178 ld -r is used.
179 * testsuite/libctf-regression/nonstatic-var-section-ld-executable.lk:
180 Likewise, when ld of an executable is used.
181 * testsuite/libctf-regression/nonstatic-var-section-ld.lk:
182 Likewise, when ld -shared alone is used.
183 * testsuite/libctf-regression/nonstatic-var-section-ld*.c:
184 Lookup programs for the above.
185 * testsuite/libctf-writable/symtypetab-nonlinker-writeout.*: New
186 test, testing survival of symbols across ctf_write paths.
187 * testsuite/lib/ctf-lib.exp (run_lookup_test): New option,
188 nonshared, suppressing linking of the SOURCE with -shared.
189
26503e2f
NA
1902021-01-19 Nick Alcock <nick.alcock@oracle.com>
191
192 * ctf-create.c (membadd): Transform ""-named members into
193 NULL-named ones.
194 * testsuite/libctf-regression/type-add-unnamed-struct*: New test.
195
e05a3e5a
NA
1962021-01-19 Nick Alcock <nick.alcock@oracle.com>
197
198 * ctf-lookup.c (ctf_lookup_by_name_internal): Do not return the
199 base type if looking up a nonexistent pointer type.
200 * testsuite/libctf-regression/pptrtab*: Test it.
201
5347ed60
AM
2022021-01-13 Alan Modra <amodra@gmail.com>
203
204 * Makefile.in: Regenerate.
205
d546b610
L
2062021-01-12 H.J. Lu <hongjiu.lu@intel.com>
207
208 PR binutils/26792
209 * configure.ac: Use GNU_MAKE_JOBSERVER.
210 * aclocal.m4: Regenerated.
211 * configure: Likewise.
212
83b33c6c
L
2132021-01-11 H.J. Lu <hongjiu.lu@intel.com>
214
215 PR ld/27173
216 * configure: Regenerated.
217
a4966cd9
L
2182021-01-09 H.J. Lu <hongjiu.lu@intel.com>
219
220 * configure: Regenerated.
221
055bc77a
NC
2222021-01-09 Nick Clifton <nickc@redhat.com>
223
224 * 2.36 release branch crated.
225
64307045
AM
2262021-01-09 Alan Modra <amodra@gmail.com>
227
228 * configure: Regenerate.
229
f4782128
ST
2302021-01-07 Samuel Thibault <samuel.thibault@gnu.org>
231
232 * configure: Regenerate.
233
0814dbfb
NA
2342021-01-05 Nick Alcock <nick.alcock@oracle.com>
235
236 * testsuite/libctf-lookup/struct-iteration.c (main):
237 ctf_member_count returns an int.
238
70d3120f
NA
2392021-01-05 Nick Alcock <nick.alcock@oracle.com>
240
241 * Makefile.am (BASEDIR): New.
242 (BFDDIR): Likewise.
243 (check-DEJAGNU): Add development.exp to prerequisites.
244 (development.exp): New.
245 (CONFIG_STATUS_DEPENDENCIES): New.
246 (EXTRA_DEJAGNU_SITE_CONFIG): Likewise.
247 (DISTCLEANFILES): Likewise.
248 * Makefile.in: Regenerated.
249 * testsuite/lib/ctf-lib.exp (check_ctf_available): Return boolean.
250 * testsuite/libctf-lookup/lookup.exp: Call check_ctf_available.
251 * testsuite/libctf-regression/regression.exp: Likewise.
252
b4b6ea46
NA
2532021-01-05 Nick Alcock <nick.alcock@oracle.com>
254
255 * ctf-types.c (ctf_type_aname): Print forwards to unions and enums
256 properly.
257
abe4ca69
NA
2582021-01-05 Nick Alcock <nick.alcock@oracle.com>
259
260 * ctf-impl.h (ctf_dict_t) <ctf_pptrtab>: New.
261 <ctf_pptrtab_len>: New.
262 <ctf_pptrtab_typemax>: New.
263 * ctf-create.c (ctf_serialize): Update accordingly.
264 (ctf_add_reftype): Note that we don't need to update pptrtab here,
265 despite updating ptrtab.
266 * ctf-open.c (ctf_dict_close): Destroy the pptrtab.
267 (ctf_import): Likewise.
268 (ctf_import_unref): Likewise.
269 * ctf-lookup.c (grow_pptrtab): New.
270 (refresh_pptrtab): New, update a pptrtab.
271 (ctf_lookup_by_name): Turn into a wrapper around (and rename to)...
272 (ctf_lookup_by_name_internal): ... this: construct the pptrtab, and
273 use it in addition to the parent's ptrtab when parent dicts are
274 searched.
275 * testsuite/libctf-regression/regression.exp: New testsuite for
276 regression tests.
277 * testsuite/libctf-regression/pptrtab*: New test.
278 * testsuite/libctf-writable/writable.exp: New testsuite for tests of
279 writable CTF dicts.
280 * testsuite/libctf-writable/pptrtab*: New test.
281
8769046e
NA
2822021-01-05 Nick Alcock <nick.alcock@oracle.com>
283
284 * ctf-archive.c (ctf_archive_iter): Remove outdated comment.
285
6c3a3877
NA
2862021-01-05 Nick Alcock <nick.alcock@oracle.com>
287
288 * ctf-impl.h (struct ctf_next) <u.ctn_next>: Move to...
289 <ctn_next>: ... here.
290 * ctf-util.c (ctf_next_destroy): Unconditionally destroy it.
291 * ctf-lookup.c (ctf_symbol_next): Adjust accordingly.
292 * ctf-types.c (ctf_member_iter): Reimplement in terms of...
293 (ctf_member_next): ... this. Support recursive unnamed member
294 iteration (off by default).
295 (ctf_member_info): Look up members in unnamed sub-structs.
296 * ctf-dedup.c (ctf_dedup_rhash_type): Adjust ctf_member_next call.
297 (ctf_dedup_emit_struct_members): Likewise.
298 * testsuite/libctf-lookup/struct-iteration-ctf.c: Test empty unnamed
299 members, and a normal member after the end.
300 * testsuite/libctf-lookup/struct-iteration.c: Verify that
301 ctf_member_count is consistent with the number of successful returns
302 from a non-recursive ctf_member_next.
303 * testsuite/libctf-lookup/struct-iteration-*: New, test iteration
304 over struct members.
305 * testsuite/libctf-lookup/struct-lookup.c: New test.
306 * testsuite/libctf-lookup/struct-lookup.lk: New test.
307
abed0b07
NA
3082021-01-05 Nick Alcock <nick.alcock@oracle.com>
309
310 * ctf-link.c (ctf_link_warn_outdated_inputs): New.
311 (ctf_link_write): Call it.
312
9bc76971
NA
3132021-01-05 Nick Alcock <nick.alcock@oracle.com>
314
315 * testsuite/libctf-lookup/enum-symbol.lk: New symbol-lookup test.
316 * testsuite/libctf-lookup/enum-symbol-ctf.c: New CTF input.
317 * testsuite/libctf-lookup/enum-symbol.c: New lookup test.
318
c59e30ed
NA
3192021-01-05 Nick Alcock <nick.alcock@oracle.com>
320
321 * Makefile.am (EXPECT): New.
322 (RUNTEST): Likewise.
323 (RUNTESTFLAGS): Likewise.
324 (CC_FOR_TARGET): Likewise.
325 (check-DEJAGNU): Likewise.
326 (AUTOMAKE_OPTIONS): Add dejagnu.
327 * Makefile.in: Regenerated.
328 * testsuite/config/default.exp: New.
329 * testsuite/lib/ctf-lib.exp: Likewise.
330 * testsuite/libctf-lookup/enum.lk: New test.
331 * testsuite/libctf-lookup/enum-ctf.c: New CTF input.
332 * testsuite/libctf-lookup/enum.c: New lookup test.
333 * testsuite/libctf-lookup/ambiguous-struct*.c: New test.
334 * testsuite/libctf-lookup/lookup.exp: New.
335
1038406a
NA
3362021-01-05 Nick Alcock <nick.alcock@oracle.com>
337
338 * configure.ac (BFD_LIBADD): Remove.
339 (BFD_DEPENDENCIES): Likewise. Remove associated cases.
340 (SHARED_LIBADD): Rename to...
341 (CTF_LIBADD): ... this. Stick in a suitable libiberty even when
342 linking statically.
343 * Makefile.am (libctf_nobfd_la_LIBADD): Adjust accordingly.
344 libctf uses libintl.
345 (libctf_la_LIBADD): Reference libbfd.la directly, not via
346 BFD_LIBADD.
347 (libctf_la_DEPENDENCIES): Remove.
348 * Makefile.in: Regenerate.
349 * configure: Likewise.
350
37002871
NA
3512021-01-05 Nick Alcock <nick.alcock@oracle.com>
352
353 * ctf-decl.c (ctf_decl_push): Exclude slices from the decl stack.
354 * ctf-types.c (ctf_type_aname): No longer deal with slices here.
355 * ctf-dump.c (ctf_dump_membstate_t) <cdm_toplevel_indent>: Constify.
356 (CTF_FT_REFS): New.
357 (CTF_FT_BITFIELD): Likewise.
358 (CTF_FT_ID): Likewise.
359 (ctf_dump_member): Do not do indentation here. Migrate the
360 type-printing parts of this into...
361 (ctf_dump_format_type): ... here, to be shared by all type printers.
362 Get the errno value for non-representable types right. Do not print
363 bitfield info for non-bitfields. Improve the format and indentation
364 of other type output. Shuffle spacing around to make all indentation
365 either 'width of column' or 4 chars.
366 (ctf_dump_label): Pass CTF_FT_REFS to ctf_dump_format_type.
367 (ctf_dump_objts): Likewise. Spacing shuffle.
368 (ctf_dump_var): Likewise.
369 (type_hex_digits): Migrate down in the file, to above its new user.
370 (ctf_dump_type): Indent here instead. Pass CTF_FT_REFS to
371 ctf_dump_format_type. Don't trim off excess linefeeds now we no
372 longer generate them. Dump enumerated types.
373
ffeece6a
NA
3742021-01-05 Nick Alcock <nick.alcock@oracle.com>
375
376 * ctf-types.c (ctf_type_resolve): Improve comment.
377 (ctf_type_size): Yield ECTF_INCOMPLETE when applied to forwards.
378 Emit errors into the right dict.
379 (ctf_type_align): Likewise.
380 * ctf-create.c (ctf_add_member_offset): Yield ECTF_INCOMPLETE
381 when adding a member without explicit offset when this member, or
382 the previous member, is incomplete.
383 * ctf-dump.c (ctf_dump_format_type): Do not try to print the size of
384 forwards.
385 (ctf_dump_member): Do not try to print their alignment.
386
91e7ce2f
NA
3872021-01-05 Nick Alcock <nick.alcock@oracle.com>
388
389 * ctf-dump.c (ctf_dump_objts): Dump by calling ctf_dump_format_type.
390 (ctf_dump_format_type): Don't emit the size for function objects.
391 Dump the element type of arrays like we dump the pointed-to type of
392 pointers, etc.
393
57f97d0e
NA
3942021-01-05 Nick Alcock <nick.alcock@oracle.com>
395
396 * ctf-dump.c (ctf_dump_format_type): Add 0x to hex type IDs.
397 (ctf_dump_header): Add 0x to the hex magic number.
398 (ctf_dump_str): Add 0x to the hex string offsets.
399 (ctf_dump_membstate_t) <cdm_toplevel_indent>: New.
400 (ctf_dump_type): Adjust. Free it when we're done.
401 (type_hex_digits): New.
402 (ctf_dump_member): Align output depending on the width of the type
403 ID being generated. Use printf padding, not a loop, to generate
404 indentation.
405
b09ad6ea
NA
4062021-01-05 Nick Alcock <nick.alcock@oracle.com>
407
408 * ctf-decl.c (ctf_decl_push): Don't print array decls backwards.
409
a7c23ac9
NB
4102021-01-04 Nicolas Boulenguez <nicolas@debian.org>
411
412 PR 27117
413 * configure.ac: Make AC_CONFIG_MACRO_DIR consistent with
414 ACLOCAL_AMFLAGS -I dirs.
415 * configure: Regenerate.
416
250d07de
AM
4172021-01-01 Alan Modra <amodra@gmail.com>
418
419 Update year range in copyright notice of all files.
420
c2795844
AM
421For older changes see ChangeLog-2020
422\f
423Copyright (C) 2021 Free Software Foundation, Inc.
60da9d95 424
c2795844
AM
425Copying and distribution of this file, with or without modification,
426are permitted in any medium without royalty provided the copyright
427notice and this notice are preserved.
60da9d95 428
60da9d95
NA
429Local Variables:
430mode: change-log
431left-margin: 8
c2795844 432fill-column: 74
60da9d95
NA
433version-control: never
434End: