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