ChangeLog 31 KB

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