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