48798043efdf063ebd8aed50961fd9057821761a
[deliverable/binutils-gdb.git] / libctf / ChangeLog
1 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-subr.c (ctf_dprintf): _libctf_debug is unlikely to be set.
4
5 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
6
7 * ctf-impl.h (struct ctf_archive_internal)
8 <ctfi_unmap_on_close>: New.
9 (ctf_new_archive_internal): Adjust.
10 * ctf-archive.c (ctf_new_archive_internal): Likewise.
11 Initialize ctfi_unmap_on_close. Adjust error path.
12 (ctf_arc_bufopen): Adjust ctf_new_archive_internal call
13 (unmap_on_close is 0).
14 (ctf_arc_close): Only unmap if ctfi_unmap_on_close.
15 * ctf-open-bfd.c (ctf_fdopen): Adjust.
16
17 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
18
19 * ctf-types.c (ctf_type_aname): Return ECTF_CORRUPT if
20 ints, floats or typedefs have no name. Fix comment typo.
21
22 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
23
24 * ctf-create.c (ctf_add_slice): Support slices of any kind that
25 resolves to an integral type.
26 * ctf-types.c (ctf_type_encoding): Resolve the type before
27 fishing its encoding out.
28
29 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
30
31 * ctf-create.c (ctf_create): Mark dirty.
32
33 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
34
35 * ctf-create.c (membcmp) Skip nameless members.
36
37 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
38
39 * ctf-create.c (ctf_add_member_offset): Support names of ""
40 as if they were the null pointer.
41
42 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
43
44 * ctf-open.c (init_types): Remove typeless CTF_K_FORWARD
45 special-casing.
46
47 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
48
49 * ctf-types.c (ctf_type_reference): Add support for dynamic slices.
50
51 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
52
53 * ctf-create.c (ctf_serialize): Add cast.
54 (ctf_add_slice): Likewise.
55
56 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
57
58 * ctf-impl.h (ctf_dtdef_t) <dtu_argv>: Fix type.
59 * ctf-create.c (ctf_add_function): Check for unimplemented type
60 and populate at the same time. Populate one-by-one, not via
61 memcpy.
62 (ctf_serialize): Remove unnecessary cast.
63 * ctf-types.c (ctf_func_type_info): Likewise.
64 (ctf_func_type_args): Likewise. Fix comment typo.
65
66 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
67
68 * ctf-create.c (ctf_add_reftype): Support refs to type zero.
69 (ctf_add_array): Support array contents of type zero.
70 (ctf_add_function): Support arguments and return types of
71 type zero.
72 (ctf_add_typedef): Support typedefs to type zero.
73 (ctf_add_member_offset): Support members of type zero,
74 unless added at unspecified (naturally-aligned) offset.
75
76 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
77
78 * ctf-error.c: Include <stddef.h>, for offsetof.
79 (_ctf_errlist): Migrate to...
80 (_ctf_errlist_t): ... this.
81 (_ctf_erridx): New, indexes into _ctf_errlist_t.
82 (_ctf_nerr): Remove.
83 (ctf_errmsg): Adjust accordingly.
84 * Makefile.am (BUILT_SOURCES): Note...
85 (ctf-error.h): ... this new rule.
86 * Makefile.in: Regenerate.
87 * mkerrors.sed: New, process ctf-api.h to generate ctf-error.h.
88 * .gitignore: New, ignore ctf-error.h.
89
90 2020-07-22 Nick Alcock <nick.alcock@oracle.com>
91
92 * ctf-impl.h: Fix typos in comments.
93
94 2020-07-22 Nick Clifton <nickc@redhat.com>
95
96 * ctf-archive.c (ctf_arc_write): Avoid calling close twice on the
97 same file descriptor.
98
99 2020-07-04 Nick Clifton <nickc@redhat.com>
100
101 Binutils 2.35 branch created.
102
103 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
104
105 * aclocal.m4: Add config/gettext-sister.m4: Shuffle into
106 alphabetical order.
107 * configure.ac: Add ZW_GNU_GETTEXT_SISTER_DIR.
108 * config.h.in: Regenerated.
109 * Makefile.in: Likewise.
110 * configure: Likewise.
111
112 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
113
114 * ctf-create.c: Include <unistd.h>.
115 * ctf-open-bfd.c: Likewise.
116
117 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
118
119 PR libctf/25120
120 * configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
121 * swap.h (bswap_16): Do not assume that presence of <byteswap.h>
122 means this is declared.
123 (bswap_32): Likewise.
124 (bswap_64): Likewise.
125 (bswap_identity_64): Remove, unused.
126 * configure: Regenerated.
127 * config.h.in: Likewise.
128
129 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
130
131 PR libctf/25120
132 * ctf-impl.h (_libctf_printflike_): Add non-GNU-C fallback.
133 (_libctf_unlikely_): Likewise.
134 (_libctf_unused): Likewise.
135 (_libctf_malloc_): Likewise.
136
137 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
138
139 PR libctf/25120
140 * ctf-archive.c (search_nametbl): No longer global: declare...
141 (ctf_arc_open_by_name_internal): ... here. Use bsearch_r.
142 (search_modent_by_name): Take and use ARG for the nametbl.
143
144 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
145
146 * ctf-impl.h (ctf_new_archive_internal): Declare.
147 (ctf_arc_bufopen): Remove.
148 (ctf_archive_internal) <ctfi_free_symsect>: New.
149 * ctf-archive.c (ctf_arc_close): Use it.
150 (ctf_arc_bufopen): Fuse into...
151 (ctf_new_archive_internal): ... this, moved across from...
152 * ctf-open-bfd.c: ... here.
153 (ctf_bfdopen_ctfsect): Use ctf_arc_bufopen.
154 * libctf.ver: Add it.
155
156 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
157
158 * ctf-create.c (ctf_add_forward): Intern in the right namespace.
159 (ctf_dtd_delete): Remove correspondingly.
160 (ctf_rollback): Likewise.
161
162 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
163
164 * ctf-create.c (ctf_add_type_internal): Hand back existing types
165 unchanged.
166
167 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
168
169 * ctf-create.c (ctf_add_forward): Don't add forwards to
170 types that already exist.
171
172 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
173
174 * ctf-open.c (init_types): Only intern root-visible types.
175 * ctf-create.c (ctf_dtd_insert): Likewise.
176 (ctf_dtd_delete): Only remove root-visible types.
177 (ctf_rollback): Likewise.
178 (ctf_add_generic): Adjust.
179 (ctf_add_struct_sized): Adjust comment.
180 (ctf_add_union_sized): Likewise.
181 (ctf_add_enum): Likewise.
182 * ctf-impl.h (ctf_dtd_insert): Adjust prototype.
183
184 2020-03-11 John Baldwin <jhb@FreeBSD.org>
185
186 * swap.h (bswap_identity_64): Make static.
187
188 2020-01-18 Nick Clifton <nickc@redhat.com>
189
190 Binutils 2.34 branch created.
191
192 2020-01-05 Joel Brobecker <brobecker@adacore.com>
193
194 PR binutils/25155:
195 * configure.ac: Add AC_CHECK_DECLS([asprintf]).
196 * configure, config.h.in: Regenerate.
197
198 2020-01-01 Alan Modra <amodra@gmail.com>
199
200 Update year range in copyright notice of all files.
201
202 2019-10-16 Simon Marchi <simon.marchi@polymtl.ca>
203
204 * swap.h (bswap_16, bswap_32, bswap_64): Make static.
205
206 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
207
208 * ctf-open.c (ctf_bufopen_internal): Fix tabdamage.
209 * ctf-types.c (ctf_type_lname): Likewise.
210
211 2019-09-23 Nick Alcock <nick.alcock@oracle.com>
212
213 * ctf-open.c (ctf_import): Do not leak a ctf_file_t ref on every
214 ctf_import after the first for a given file.
215
216 2019-09-23 Nick Alcock <nick.alcock@oracle.com>
217
218 * ctf-impl.h (ctf_str_append_noerr): Declare.
219 * ctf-util.c (ctf_str_append_noerr): Define in terms of
220 ctf_str_append.
221 * ctf-dump.c (str_append): New, call it.
222 (ctf_dump_format_type): Use str_append, not ctf_str_append.
223 (ctf_dump_label): Likewise.
224 (ctf_dump_objts): Likewise.
225 (ctf_dump_funcs): Likewise.
226 (ctf_dump_var): Likewise.
227 (ctf_dump_member): Likewise.
228 (ctf_dump_type): Likewise.
229 (ctf_dump): Likewise.
230
231 2019-09-23 Nick Alcock <nick.alcock@oracle.com>
232
233 * ctf-impl.h (ctf_alloc): Remove.
234 (ctf_free): Likewise.
235 (ctf_strdup): Likewise.
236 * ctf-subr.c (ctf_alloc): Remove.
237 (ctf_free): Likewise.
238 * ctf-util.c (ctf_strdup): Remove.
239
240 * ctf-create.c (ctf_serialize): Use malloc, not ctf_alloc; free, not
241 ctf_free; strdup, not ctf_strdup.
242 (ctf_dtd_delete): Likewise.
243 (ctf_dvd_delete): Likewise.
244 (ctf_add_generic): Likewise.
245 (ctf_add_function): Likewise.
246 (ctf_add_enumerator): Likewise.
247 (ctf_add_member_offset): Likewise.
248 (ctf_add_variable): Likewise.
249 (membadd): Likewise.
250 (ctf_compress_write): Likewise.
251 (ctf_write_mem): Likewise.
252 * ctf-decl.c (ctf_decl_push): Likewise.
253 (ctf_decl_fini): Likewise.
254 (ctf_decl_sprintf): Likewise. Check for OOM.
255 * ctf-dump.c (ctf_dump_append): Use malloc, not ctf_alloc; free, not
256 ctf_free; strdup, not ctf_strdup.
257 (ctf_dump_free): Likewise.
258 (ctf_dump): Likewise.
259 * ctf-open.c (upgrade_types_v1): Likewise.
260 (init_types): Likewise.
261 (ctf_file_close): Likewise.
262 (ctf_bufopen_internal): Likewise. Check for OOM.
263 (ctf_parent_name_set): Likewise: report the OOM to the caller.
264 (ctf_cuname_set): Likewise.
265 (ctf_import): Likewise.
266 * ctf-string.c (ctf_str_purge_atom_refs): Use malloc, not ctf_alloc;
267 free, not ctf_free; strdup, not ctf_strdup.
268 (ctf_str_free_atom): Likewise.
269 (ctf_str_create_atoms): Likewise.
270 (ctf_str_add_ref_internal): Likewise.
271 (ctf_str_remove_ref): Likewise.
272 (ctf_str_write_strtab): Likewise.
273
274 2019-08-09 Nick Alcock <nick.alcock@oracle.com>
275
276 * ctf-types.c (ctf_type_encoding): Fix the dynamic case to
277 work right for non-int/fps.
278
279 2019-08-08 Nick Alcock <nick.alcock@oracle.com>
280
281 * ctf-types.c (ctf_type_name): Don't strlen a potentially-
282 null pointer.
283
284 2019-08-07 Nick Alcock <nick.alcock@oracle.com>
285
286 * ctf-impl.h (ctf_file_t) <ctf_add_processing>: New.
287 * ctf-open.c (ctf_file_close): Free it.
288 * ctf-create.c (ctf_serialize): Adjust.
289 (membcmp): When reporting a conflict due to an error, report the
290 error.
291 (ctf_add_type): Turn into a ctf_add_processing wrapper. Rename to...
292 (ctf_add_type_internal): ... this. Hand back types we are already
293 in the middle of adding immediately. Hand back structs/unions with
294 the same number of members immediately. Do not walk the dynamic
295 list. Call ctf_add_type_internal, not ctf_add_type. Handle
296 forwards promoted to other types and the inverse case identically.
297 Add structs to the mapping as soon as we intern them, before they
298 gain any members.
299
300 2019-08-09 Nick Alcock <nick.alcock@oracle.com>
301
302 * ctf-impl.h (ctf_names_t): New.
303 (ctf_lookup_t) <ctf_hash>: Now a ctf_names_t, not a ctf_hash_t.
304 (ctf_file_t) <ctf_structs>: Likewise.
305 <ctf_unions>: Likewise.
306 <ctf_enums>: Likewise.
307 <ctf_names>: Likewise.
308 <ctf_lookups>: Improve comment.
309 <ctf_ptrtab_len>: New.
310 <ctf_prov_strtab>: New.
311 <ctf_str_prov_offset>: New.
312 <ctf_dtbyname>: Remove, redundant to the names hashes.
313 <ctf_dtnextid>: Remove, redundant to ctf_typemax.
314 (ctf_dtdef_t) <dtd_name>: Remove.
315 <dtd_data>: Note that the ctt_name is now populated.
316 (ctf_str_atom_t) <csa_offset>: This is now the strtab
317 offset for internal strings too.
318 <csa_external_offset>: New, the external strtab offset.
319 (CTF_INDEX_TO_TYPEPTR): Handle the LCTF_RDWR case.
320 (ctf_name_table): New declaration.
321 (ctf_lookup_by_rawname): Likewise.
322 (ctf_lookup_by_rawhash): Likewise.
323 (ctf_set_ctl_hashes): Likewise.
324 (ctf_serialize): Likewise.
325 (ctf_dtd_insert): Adjust.
326 (ctf_simple_open_internal): Likewise.
327 (ctf_bufopen_internal): Likewise.
328 (ctf_list_empty_p): Likewise.
329 (ctf_str_remove_ref): Likewise.
330 (ctf_str_add): Returns uint32_t now.
331 (ctf_str_add_ref): Likewise.
332 (ctf_str_add_external): Now returns a boolean (int).
333 * ctf-string.c (ctf_strraw_explicit): Check the ctf_prov_strtab
334 for strings in the appropriate range.
335 (ctf_str_create_atoms): Create the ctf_prov_strtab. Detect OOM
336 when adding the null string to the new strtab.
337 (ctf_str_free_atoms): Destroy the ctf_prov_strtab.
338 (ctf_str_add_ref_internal): Add make_provisional argument. If
339 make_provisional, populate the offset and fill in the
340 ctf_prov_strtab accordingly.
341 (ctf_str_add): Return the offset, not the string.
342 (ctf_str_add_ref): Likewise.
343 (ctf_str_add_external): Return a success integer.
344 (ctf_str_remove_ref): New, remove a single ref.
345 (ctf_str_count_strtab): Do not count the initial null string's
346 length or the existence or length of any unreferenced internal
347 atoms.
348 (ctf_str_populate_sorttab): Skip atoms with no refs.
349 (ctf_str_write_strtab): Populate the nullstr earlier. Add one
350 to the cts_len for the null string, since it is no longer done
351 in ctf_str_count_strtab. Adjust for csa_external_offset rename.
352 Populate the csa_offset for both internal and external cases.
353 Flush the ctf_prov_strtab afterwards, and reset the
354 ctf_str_prov_offset.
355 * ctf-create.c (ctf_grow_ptrtab): New.
356 (ctf_create): Call it. Initialize new fields rather than old
357 ones. Tell ctf_bufopen_internal that this is a writable dictionary.
358 Set the ctl hashes and data model.
359 (ctf_update): Rename to...
360 (ctf_serialize): ... this. Leave a compatibility function behind.
361 Tell ctf_simple_open_internal that this is a writable dictionary.
362 Pass the new fields along from the old dictionary. Drop
363 ctf_dtnextid and ctf_dtbyname. Use ctf_strraw, not dtd_name.
364 Do not zero out the DTD's ctt_name.
365 (ctf_prefixed_name): Rename to...
366 (ctf_name_table): ... this. No longer return a prefixed name: return
367 the applicable name table instead.
368 (ctf_dtd_insert): Use it, and use the right name table. Pass in the
369 kind we're adding. Migrate away from dtd_name.
370 (ctf_dtd_delete): Adjust similarly. Remove the ref to the
371 deleted ctt_name.
372 (ctf_dtd_lookup_type_by_name): Remove.
373 (ctf_dynamic_type): Always return NULL on read-only dictionaries.
374 No longer check ctf_dtnextid: check ctf_typemax instead.
375 (ctf_snapshot): No longer use ctf_dtnextid: use ctf_typemax instead.
376 (ctf_rollback): Likewise. No longer fail with ECTF_OVERROLLBACK. Use
377 ctf_name_table and the right name table, and migrate away from
378 dtd_name as in ctf_dtd_delete.
379 (ctf_add_generic): Pass in the kind explicitly and pass it to
380 ctf_dtd_insert. Use ctf_typemax, not ctf_dtnextid. Migrate away
381 from dtd_name to using ctf_str_add_ref to populate the ctt_name.
382 Grow the ptrtab if needed.
383 (ctf_add_encoded): Pass in the kind.
384 (ctf_add_slice): Likewise.
385 (ctf_add_array): Likewise.
386 (ctf_add_function): Likewise.
387 (ctf_add_typedef): Likewise.
388 (ctf_add_reftype): Likewise. Initialize the ctf_ptrtab, checking
389 ctt_name rather than dtd_name.
390 (ctf_add_struct_sized): Pass in the kind. Use
391 ctf_lookup_by_rawname, not ctf_hash_lookup_type /
392 ctf_dtd_lookup_type_by_name.
393 (ctf_add_union_sized): Likewise.
394 (ctf_add_enum): Likewise.
395 (ctf_add_enum_encoded): Likewise.
396 (ctf_add_forward): Likewise.
397 (ctf_add_type): Likewise.
398 (ctf_compress_write): Call ctf_serialize: adjust for ctf_size not
399 being initialized until after the call.
400 (ctf_write_mem): Likewise.
401 (ctf_write): Likewise.
402 * ctf-archive.c (arc_write_one_ctf): Likewise.
403 * ctf-lookup.c (ctf_lookup_by_name): Use ctf_lookuup_by_rawhash, not
404 ctf_hash_lookup_type.
405 (ctf_lookup_by_id): No longer check the readonly types if the
406 dictionary is writable.
407 * ctf-open.c (init_types): Assert that this dictionary is not
408 writable. Adjust to use the new name hashes, ctf_name_table,
409 and ctf_ptrtab_len. GNU style fix for the final ptrtab scan.
410 (ctf_bufopen_internal): New 'writable' parameter. Flip on LCTF_RDWR
411 if set. Drop out early when dictionary is writable. Split the
412 ctf_lookups initialization into...
413 (ctf_set_cth_hashes): ... this new function.
414 (ctf_simple_open_internal): Adjust. New 'writable' parameter.
415 (ctf_simple_open): Adjust accordingly.
416 (ctf_bufopen): Likewise.
417 (ctf_file_close): Destroy the appropriate name hashes. No longer
418 destroy ctf_dtbyname, which is gone.
419 (ctf_getdatasect): Remove spurious "extern".
420 * ctf-types.c (ctf_lookup_by_rawname): New, look up types in the
421 specified name table, given a kind.
422 (ctf_lookup_by_rawhash): Likewise, given a ctf_names_t *.
423 (ctf_member_iter): Add support for iterating over the
424 dynamic type list.
425 (ctf_enum_iter): Likewise.
426 (ctf_variable_iter): Likewise.
427 (ctf_type_rvisit): Likewise.
428 (ctf_member_info): Add support for types in the dynamic type list.
429 (ctf_enum_name): Likewise.
430 (ctf_enum_value): Likewise.
431 (ctf_func_type_info): Likewise.
432 (ctf_func_type_args): Likewise.
433 * ctf-link.c (ctf_accumulate_archive_names): No longer call
434 ctf_update.
435 (ctf_link_write): Likewise.
436 (ctf_link_intern_extern_string): Adjust for new
437 ctf_str_add_external return value.
438 (ctf_link_add_strtab): Likewise.
439 * ctf-util.c (ctf_list_empty_p): New.
440
441 2019-08-05 Nick Alcock <nick.alcock@oracle.com>
442
443 * ctf-types.c (ctf_type_resolve): Return ECTF_NONREPRESENTABLE on
444 type zero.
445 * ctf-create.c (ctf_add_type): Detect and skip nonrepresentable
446 members and types.
447 (ctf_add_variable): Likewise for variables pointing to them.
448 * ctf-link.c (ctf_link_one_type): Do not warn for nonrepresentable
449 type link failure, but do warn for others.
450 * ctf-dump.c (ctf_dump_format_type): Likewise. Do not assume all
451 errors to be ENOMEM.
452 (ctf_dump_member): Likewise.
453 (ctf_dump_type): Likewise.
454 (ctf_dump_header_strfield): Do not assume all errors to be ENOMEM.
455 (ctf_dump_header_sectfield): Do not assume all errors to be ENOMEM.
456 (ctf_dump_header): Likewise.
457 (ctf_dump_label): likewise.
458 (ctf_dump_objts): likewise.
459 (ctf_dump_funcs): likewise.
460 (ctf_dump_var): likewise.
461 (ctf_dump_str): Likewise.
462
463 2019-09-30 Nick Alcock <nick.alcock@oracle.com>
464
465 * configure.ac (AC_DISABLE_SHARED): New, like opcodes/.
466 (LT_INIT): Likewise.
467 (AM_INSTALL_LIBBFD): Likewise.
468 (dlopen): Note why this is necessary in a comment.
469 (SHARED_LIBADD): Initialize for possibly-PIC libiberty: derived from
470 opcodes/.
471 (SHARED_LDFLAGS): Likewise.
472 (BFD_LIBADD): Likewise, for libbfd.
473 (BFD_DEPENDENCIES): Likewise.
474 (VERSION_FLAGS): Initialize, using a version script if ld supports
475 one, or libtool -export-symbols-regex otherwise.
476 (AC_CONFIG_MACRO_DIR): Add ../BFD.
477 * Makefile.am (ACLOCAL_AMFLAGS): Likewise.
478 (INCDIR): New.
479 (AM_CPPFLAGS): Use $(srcdir), not $(top_srcdir).
480 (noinst_LIBRARIES): Replace with...
481 [INSTALL_LIBBFD] (lib_LTLIBRARIES): This, or...
482 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES): ... this, mentioning new
483 libctf-nobfd.la as well.
484 [INSTALL_LIBCTF] (include_HEADERS): Add the CTF headers.
485 [!INSTALL_LIBCTF] (include_HEADERS): New, empty.
486 (libctf_a_SOURCES): Rename to...
487 (libctf_nobfd_la_SOURCES): ... this, all of libctf other than
488 ctf-open-bfd.c.
489 (libctf_la_SOURCES): Now derived from libctf_nobfd_la_SOURCES,
490 with ctf-open-bfd.c added.
491 (libctf_nobfd_la_LIBADD): New, using @SHARED_LIBADD@.
492 (libctf_la_LIBADD): New, using @BFD_LIBADD@ as well.
493 (libctf_la_DEPENDENCIES): New, using @BFD_DEPENDENCIES@.
494 * Makefile.am [INSTALL_LIBCTF]: Use it.
495 * aclocal.m4: Add ../bfd/acinclude.m4, ../config/acx.m4, and the
496 libtool macros.
497 * libctf.ver: New, everything is version LIBCTF_1.0 currently (even
498 the unstable components).
499 * Makefile.in: Regenerated.
500 * config.h.in: Likewise.
501 * configure: Likewise.
502
503 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
504
505 * configure.ac (INSTALL_LIBCTF): New, controlled by
506 --enable-install-libctf.
507 [INSTALL_LIBCTF] (lib_LIBRARIES): Add libctf.a.
508 * Makefile.in: Regenerated.
509 * configure: Regenerated.
510
511 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
512
513 * ctf-archive.c (ctf_arc_close): Call ctfi_bfd_close if set.
514 * ctf-open-bfd.c (ctf_bfdclose): Fix comment.
515
516 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
517
518 * ctf-open-bfd.c (ctf_fdopen): Call bfd_set_cacheable.
519
520 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
521
522 * ctf-impl.h (includes): Include <sys/param.h> here.
523
524 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
525
526 * ctf-open.c (flip_lbls): Eschew for-loop initial declarations.
527 (flip_objts): Likewise.
528 (flip_vars): Likewise.
529 (flip_types): Likewise.
530
531 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
532
533 * ctf-hash.c (ctf_hashtab_insert): Pass in the key and value
534 freeing functions: if set, free the key and value if the slot
535 already exists. Always reassign the key.
536 (ctf_dynhash_insert): Adjust call appropriately.
537 (ctf_hash_insert_type): Likewise.
538
539 2019-08-03 Nick Alcock <nick.alcock@oracle.com>
540
541 * ctf-create.c (ctf_add_type): Look up and use the forwarded-to
542 type kind. Allow forwards to unify with pre-existing structs/
543 unions/enums.
544
545 2019-07-30 Nick Alcock <nick.alcock@oracle.com>
546
547 * ctf-impl.h (ctf_file_t) <ctf_link_cu_mappping>: New.
548 <ctf_link_memb_name_changer>: Likewise.
549 <ctf_link_memb_name_changer_arg>: Likewise.
550 * ctf-create.c (ctf_update): Update accordingly.
551 * ctf-open.c (ctf_file_close): Likewise.
552 * ctf-link.c (ctf_create_per_cu): Apply the cu mapping.
553 (ctf_link_add_cu_mapping): New.
554 (ctf_link_set_memb_name_changer): Likewise.
555 (ctf_change_parent_name): New.
556 (ctf_name_list_accum_cb_arg_t) <dynames>: New, storage for names
557 allocated by the caller's ctf_link_memb_name_changer.
558 <ndynames>: Likewise.
559 (ctf_accumulate_archive_names): Call the ctf_link_memb_name_changer.
560 (ctf_link_write): Likewise (for _CTF_SECTION only): also call
561 ctf_change_parent_name. Free any resulting names.
562
563 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
564
565 * ctf-link.c (ctf_create_per_cu): New, refactored out of...
566 (ctf_link_one_type): ... here, with parent-name setting added.
567 (check_variable): New.
568 (ctf_link_one_variable): Likewise.
569 (ctf_link_one_input_archive_member): Call it.
570 * ctf-error.c (_ctf_errlist): Updated with new errors.
571
572 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
573
574 * ctf-impl.h (ctf_file_t): New field ctf_link_type_mapping.
575 (struct ctf_link_type_mapping_key): New.
576 (ctf_hash_type_mapping_key): Likewise.
577 (ctf_hash_eq_type_mapping_key): Likewise.
578 (ctf_add_type_mapping): Likewise.
579 (ctf_type_mapping): Likewise.
580 (ctf_dynhash_empty): Likewise.
581 * ctf-open.c (ctf_file_close): Update accordingly.
582 * ctf-create.c (ctf_update): Likewise.
583 (ctf_add_type): Populate the mapping.
584 * ctf-hash.c (ctf_hash_type_mapping_key): Hash a type mapping key.
585 (ctf_hash_eq_type_mapping_key): Check the key for equality.
586 (ctf_dynhash_insert): Fix comment typo.
587 (ctf_dynhash_empty): New.
588 * ctf-link.c (ctf_add_type_mapping): New.
589 (ctf_type_mapping): Likewise.
590 (empty_link_type_mapping): New.
591 (ctf_link_one_input_archive): Call it.
592
593 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
594
595 * ctf-link.c: New file, linking of the string and type sections.
596 * Makefile.am (libctf_a_SOURCES): Add it.
597 * Makefile.in: Regenerate.
598
599 * ctf-impl.h (ctf_file_t): New fields ctf_link_inputs,
600 ctf_link_outputs.
601 * ctf-create.c (ctf_update): Update accordingly.
602 * ctf-open.c (ctf_file_close): Likewise.
603 * ctf-error.c (_ctf_errlist): Updated with new errors.
604
605 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
606
607 * ctf-dump.c (ctf_dump_funcs): Check the right error value.
608
609 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
610
611 * ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not
612 ctf_type_iter.
613 (ctf_dump_type): Pass down the flag from ctf_type_iter_all.
614 (ctf_dump_format_type): Add non-root-type { } notation.
615 Add root flag to prototype.
616 (ctf_dump_label): Adjust accordingly.
617 (ctf_dump_objts): Likewise.
618 (ctf_dump_var): Likewise.
619
620 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
621
622 * ctf-create.c (ctf_compress_write): Fix double-free.
623
624 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
625
626 * ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
627 of...
628 (ctf_arc_write_fd): ... this new function.
629 * ctf-create.c (ctf_write_mem): New.
630
631 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
632
633 * ctf-impl.h (ctf_str_atom_t) <csa_offset>: New field.
634 (ctf_file_t) <ctf_syn_ext_strtab>: Likewise.
635 (ctf_str_add_ref): Name the last arg.
636 (ctf_str_add_external) New.
637 (ctf_str_add_strraw_explicit): Likewise.
638 (ctf_simple_open_internal): Likewise.
639 (ctf_bufopen_internal): Likewise.
640
641 * ctf-string.c (ctf_strraw_explicit): Split from...
642 (ctf_strraw): ... here, with new support for ctf_syn_ext_strtab.
643 (ctf_str_add_ref_internal): Return the atom, not the
644 string.
645 (ctf_str_add): Adjust accordingly.
646 (ctf_str_add_ref): Likewise. Move up in the file.
647 (ctf_str_add_external): New: update the csa_offset.
648 (ctf_str_count_strtab): Only account for strings with no csa_offset
649 in the internal strtab length.
650 (ctf_str_write_strtab): If the csa_offset is set, update the
651 string's refs without writing the string out, and update the
652 ctf_syn_ext_strtab. Make OOM handling less ugly.
653 * ctf-create.c (struct ctf_sort_var_arg_cb): New.
654 (ctf_update): Handle failure to populate the strtab. Pass in the
655 new ctf_sort_var arg. Adjust for ctf_syn_ext_strtab addition.
656 Call ctf_simple_open_internal, not ctf_simple_open.
657 (ctf_sort_var): Call ctf_strraw_explicit rather than looking up
658 strings by hand.
659 * ctf-hash.c (ctf_hash_insert_type): Likewise (but using
660 ctf_strraw). Adjust to diagnose ECTF_STRTAB nonetheless.
661 * ctf-open.c (init_types): No longer filter out ECTF_STRTAB.
662 (ctf_file_close): Destroy the ctf_syn_ext_strtab.
663 (ctf_simple_open): Rename to, and reimplement as a wrapper around...
664 (ctf_simple_open_internal): ... this new function, which calls
665 ctf_bufopen_internal.
666 (ctf_bufopen): Rename to, and reimplement as a wrapper around...
667 (ctf_bufopen_internal): ... this new function, which sets
668 ctf_syn_ext_strtab.
669
670 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
671
672 * ctf_types.c (ctf_type_iter_all): New.
673
674 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
675
676 * ctf-open.c (init_symtab): Check for overflow against the right
677 section.
678 (upgrade_header): Set cth_objtidxoff, cth_funcidxoff to zero-length.
679 (upgrade_types_v1): Note that these sections are not checked.
680 (flip_header): Endian-swap the header fields.
681 (flip_ctf): Endian-swap the sections.
682 (flip_objts): Update comment.
683 (ctf_bufopen): Check header offsets and alignment for validity.
684
685 2019-07-13 Nick Alcock <nick.alcock@oracle.com>
686
687 * ctf-open-bfd.c: Add <assert.h>.
688 (ctf_bfdopen_ctfsect): Open string and symbol tables using
689 techniques borrowed from bfd_elf_sym_name.
690 (ctf_new_archive_internal): Improve comment.
691 * ctf-archive.c (ctf_arc_close): Do not free the ctfi_strsect.
692 * ctf-open.c (ctf_bufopen): Allow opening with a string section but
693 no symbol section, but not vice versa.
694
695 2019-07-08 Nick Alcock <nick.alcock@oracle.com>
696
697 * ctf-impl.h (ctf_file_t): New field ctf_openflags.
698 * ctf-open.c (ctf_bufopen): Set it. No longer dump header offsets.
699 * ctf-dump.c (dump_header): New function, dump the CTF header.
700 (ctf_dump): Call it.
701 (ctf_dump_header_strfield): New function.
702 (ctf_dump_header_sectfield): Likewise.
703
704 2019-07-06 Nick Alcock <nick.alcock@oracle.com>
705
706 * ctf-impl.h (ctf_file_t): New fields ctf_header, ctf_dynbase,
707 ctf_cuname, ctf_dyncuname: ctf_base and ctf_buf are no longer const.
708 * ctf-open.c (ctf_set_base): Preserve the gap between ctf_buf and
709 ctf_base: do not assume that it is always sizeof (ctf_header_t).
710 Print out ctf_cuname: only print out ctf_parname if set.
711 (ctf_free_base): Removed, ctf_base is no longer freed: free
712 ctf_dynbase instead.
713 (ctf_set_version): Fix spacing.
714 (upgrade_header): New, in-place header upgrading.
715 (upgrade_types): Rename to...
716 (upgrade_types_v1): ... this. Free ctf_dynbase, not ctf_base. No
717 longer track old and new headers separately. No longer allow for
718 header sizes explicitly: squeeze the headers out on upgrade (they
719 are preserved in fp->ctf_header). Set ctf_dynbase, ctf_base and
720 ctf_buf explicitly. Use ctf_free, not ctf_free_base.
721 (upgrade_types): New, also handle ctf_parmax updating.
722 (flip_header): Flip ctf_cuname.
723 (flip_types): Flip BUF explicitly rather than deriving BUF from
724 BASE.
725 (ctf_bufopen): Store the header in fp->ctf_header. Correct minimum
726 required alignment of objtoff and funcoff. No longer store it in
727 the ctf_buf unless that buf is derived unmodified from the input.
728 Set ctf_dynbase where ctf_base is dynamically allocated. Drop locals
729 that duplicate fields in ctf_file: move allocation of ctf_file
730 further up instead. Call upgrade_header as needed. Move
731 version-specific ctf_parmax initialization into upgrade_types. More
732 concise error handling.
733 (ctf_file_close): No longer test for null pointers before freeing.
734 Free ctf_dyncuname, ctf_dynbase, and ctf_header. Do not call
735 ctf_free_base.
736 (ctf_cuname): New.
737 (ctf_cuname_set): New.
738 * ctf-create.c (ctf_update): Populate ctf_cuname.
739 (ctf_gzwrite): Write out the header explicitly. Remove obsolescent
740 comment.
741 (ctf_write): Likewise.
742 (ctf_compress_write): Get the header from ctf_header, not ctf_base.
743 Fix the compression length: fp->ctf_size never counted the CTF
744 header. Simplify the compress call accordingly.
745
746 2019-07-11 Hans-Peter Nilsson <hp@bitrange.com>
747
748 * ctf-endian.h: Don't assume htole64 and le64toh are always
749 present if HAVE_ENDIAN_H; also check if htole64 is defined.
750 [!WORDS_BIGENDIAN] (htole64, le64toh): Define as identity,
751 not bswap_identity_64.
752
753 2019-09-18 Alan Modra <amodra@gmail.com>
754
755 * ctf-open-bfd.c: Update throughout for bfd section macro changes.
756
757 2019-09-09 Phil Blundell <pb@pbcl.net>
758
759 binutils 2.33 branch created.
760
761 2019-07-18 Nick Alcock <nick.alcock@oracle.com>
762
763 * ctf-types.c (ctf_type_aname_raw): New.
764 (ctf_func_type_info): Likewise.
765 (ctf_func_type_args): Likewise.
766 * ctf-error.c (_ctf_errlist): Fix description.
767 * ctf-lookup.c: Fix file description.
768
769 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
770
771 * ctf-create.c (ctf_create): Fix off-by-one error.
772
773 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
774
775 * ctf-impl.h: (struct ctf_strs_writable): New, non-const version of
776 struct ctf_strs.
777 (struct ctf_dtdef): Note that dtd_data.ctt_name is unpopulated.
778 (struct ctf_str_atom): New, disambiguated single string.
779 (struct ctf_str_atom_ref): New, points to some other location that
780 references this string's offset.
781 (struct ctf_file): New members ctf_str_atoms and ctf_str_num_refs.
782 Remove member ctf_dtvstrlen: we no longer track the total strlen
783 as we add strings.
784 (ctf_str_create_atoms): Declare new function in ctf-string.c.
785 (ctf_str_free_atoms): Likewise.
786 (ctf_str_add): Likewise.
787 (ctf_str_add_ref): Likewise.
788 (ctf_str_rollback): Likewise.
789 (ctf_str_purge_refs): Likewise.
790 (ctf_str_write_strtab): Likewise.
791 (ctf_realloc): Declare new function in ctf-util.c.
792
793 * ctf-open.c (ctf_bufopen): Create the atoms table.
794 (ctf_file_close): Destroy it.
795 * ctf-create.c (ctf_update): Copy-and-free it on update. No longer
796 special-case the position of the parname string. Construct the
797 strtab by calling ctf_str_add_ref and ctf_str_write_strtab after the
798 rest of each buffer element is constructed, not via open-coding:
799 realloc the CTF buffer and append the strtab to it. No longer
800 maintain ctf_dtvstrlen. Sort the variable entry table later, after
801 strtab construction.
802 (ctf_copy_membnames): Remove: integrated into ctf_copy_{s,l,e}members.
803 (ctf_copy_smembers): Drop the string offset: call ctf_str_add_ref
804 after buffer element construction instead.
805 (ctf_copy_lmembers): Likewise.
806 (ctf_copy_emembers): Likewise.
807 (ctf_create): No longer maintain the ctf_dtvstrlen.
808 (ctf_dtd_delete): Likewise.
809 (ctf_dvd_delete): Likewise.
810 (ctf_add_generic): Likewise.
811 (ctf_add_enumerator): Likewise.
812 (ctf_add_member_offset): Likewise.
813 (ctf_add_variable): Likewise.
814 (membadd): Likewise.
815 * ctf-util.c (ctf_realloc): New, wrapper around realloc that aborts
816 if there are active ctf_str_num_refs.
817 (ctf_strraw): Move to ctf-string.c.
818 (ctf_strptr): Likewise.
819 * ctf-string.c: New file, strtab manipulation.
820
821 * Makefile.am (libctf_a_SOURCES): Add it.
822 * Makefile.in: Regenerate.
823
824 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
825
826 * ctf-impl.h (ctf_hash_iter_f): New.
827 (ctf_dynhash_iter): New declaration.
828 (ctf_dynhash_iter_remove): New declaration.
829 * ctf-hash.c (ctf_dynhash_iter): Define.
830 (ctf_dynhash_iter_remove): Likewise.
831 (ctf_hashtab_traverse): New.
832 (ctf_hashtab_traverse_remove): Likewise.
833 (struct ctf_traverse_cb_arg): Likewise.
834 (struct ctf_traverse_remove_cb_arg): Likewise.
835
836 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
837
838 * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
839
840 2019-06-28 Nick Alcock <nick.alcock@oracle.com>
841
842 * ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
843 (ctf_dump_funcs): Likewise.
844
845 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
846
847 * ctf-open-bfd.c: Add swap.h and ctf-endian.h.
848 (ctf_fdopen): Check for endian-swapped raw CTF magic, and
849 little-endian CTF archive magic. Do not check the CTF version:
850 ctf_simple_open does that in endian-safe ways. Do not dereference
851 null pointers on open failure.
852
853 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
854
855 * ctf-open.c (get_vbytes_common): Return the new slice size.
856 (ctf_bufopen): Flip the endianness of the CTF-section header copy.
857 Remember to copy in the CTF data when opening an uncompressed
858 foreign-endian CTF file. Prune useless variable manipulation.
859
860 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
861
862 * ctf-open.c (ctf_types): Fail when unidentified type kinds are
863 seen.
864
865 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
866
867 * ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
868 output.
869
870 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
871
872 * ctf-subr.c (_PAGESIZE): Remove.
873 (ctf_data_alloc): Likewise.
874 (ctf_data_free): Likewise.
875 (ctf_data_protect): Likewise.
876 * ctf-impl.h: Remove declarations.
877 * ctf-create.c (ctf_update): No longer call ctf_data_protect: use
878 ctf_free, not ctf_data_free.
879 (ctf_compress_write): Use ctf_data_alloc, not ctf_alloc. Free
880 the buffer again on compression error.
881 * ctf-open.c (ctf_set_base): No longer track the size: call
882 ctf_free, not ctf_data_free.
883 (upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
884 (ctf_bufopen): Likewise. No longer call ctf_data_protect.
885
886 2019-06-19 Nick Alcock <nick.alcock@oracle.com>
887
888 * ctf-create.c (ctf_dtd_insert): Pass on error returns from
889 ctf_dynhash_insert.
890 (ctf_dvd_insert): Likewise.
891 (ctf_add_generic): Likewise.
892 (ctf_add_variable): Likewise.
893 * ctf-impl.h: Adjust declarations.
894
895 2019-06-14 Alan Modra <amodra@gmail.com>
896
897 * configure: Regenerate.
898
899 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
900
901 * ctf-decls.h: Include <libiberty.h>.
902 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
903
904 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
905
906 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
907 (ctf_dump_objts): Likewise.
908 (ctf_dump_funcs): Likewise.
909 (ctf_dump_member): Likewise.
910 (ctf_dump_str): Likewise.
911
912 2019-06-06 Nick Alcock <nick.alcock@oracle.com>
913
914 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
915 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
916
917 2019-06-05 Nick Alcock <nick.alcock@oracle.com>
918
919 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
920 (ctf_arc_open_by_offset): Likewise.
921 * ctf-create.c (ctf_add_type): Likewise.
922
923 2019-06-04 Tom Tromey <tromey@adacore.com>
924
925 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
926 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
927
928 2019-06-04 Nick Alcock <nick.alcock@oracle.com>
929
930 * configure.ac: Check for O_CLOEXEC.
931 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
932 * config.h.in: Regenerate.
933 * configure: Likewise.
934
935 2019-06-04 Nick Alcock <nick.alcock@oracle.com>
936
937 * qsort_r.c: Rename to...
938 * ctf-qsort_r.c: ... this.
939 (_quicksort): Define to ctf_qsort_r.
940 * ctf-decls.h (qsort_r): Remove.
941 (ctf_qsort_r): Add.
942 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
943 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
944 * Makefile.am (libctf_a_LIBADD): Remove.
945 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
946 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
947 * ctf-create.c (ctf_update): Likewise.
948 * configure.ac: Check for BSD versus GNU qsort_r signature.
949 * Makefile.in: Regenerate.
950 * config.h.in: Likewise.
951 * configure: Likewise.
952
953 2019-06-03 Nick Alcock <nick.alcock@oracle.com>
954
955 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
956
957 2019-05-29 Nick Alcock <nick.alcock@oracle.com>
958
959 * Makefile.am (ZLIB): New.
960 (ZLIBINC): Likewise.
961 (AM_CFLAGS): Use them.
962 (libctf_a_LIBADD): New, for LIBOBJS.
963 * configure.ac: Check for zlib, endian.h, and qsort_r.
964 * ctf-endian.h: New, providing htole64 and le64toh.
965 * swap.h: Code style fixes.
966 (bswap_identity_64): New.
967 * qsort_r.c: New, from gnulib (with one added #include).
968 * ctf-decls.h: New, providing a conditional qsort_r declaration,
969 and unconditional definitions of MIN and MAX.
970 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
971 (ctf_set_errno): Now returns unsigned long.
972 * ctf-util.c (ctf_set_errno): Adjust here too.
973 * ctf-archive.c: Use ctf-endian.h.
974 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
975 cts_flags and cts_offset.
976 (ctf_arc_write): Drop debugging dependent on the size of off_t.
977 * ctf-create.c: Provide a definition of roundup if not defined.
978 (ctf_create): Drop cts_type, cts_flags and cts_offset.
979 (ctf_add_reftype): Do not check if type IDs are below zero.
980 (ctf_add_slice): Likewise.
981 (ctf_add_typedef): Likewise.
982 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
983 when known error-free. Drop CTF_ERR usage for functions returning
984 int.
985 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
986 int.
987 (ctf_add_variable): Likewise.
988 (enumcmp): Likewise.
989 (enumadd): Likewise.
990 (membcmp): Likewise.
991 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
992 when known error-free.
993 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
994 returning int: use CTF_ERR for functions returning ctf_type_id.
995 (ctf_dump_label): Likewise.
996 (ctf_dump_objts): Likewise.
997 * ctf-labels.c (ctf_label_topmost): Likewise.
998 (ctf_label_iter): Likewise.
999 (ctf_label_info): Likewise.
1000 * ctf-lookup.c (ctf_func_args): Likewise.
1001 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
1002 (ctf_bufopen): Likewise. Use zlib types as needed.
1003 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
1004 returning int.
1005 (ctf_enum_iter): Likewise.
1006 (ctf_type_size): Likewise.
1007 (ctf_type_align): Likewise. Cast to size_t where appropriate.
1008 (ctf_type_kind_unsliced): Likewise.
1009 (ctf_type_kind): Likewise.
1010 (ctf_type_encoding): Likewise.
1011 (ctf_member_info): Likewise.
1012 (ctf_array_info): Likewise.
1013 (ctf_enum_value): Likewise.
1014 (ctf_type_rvisit): Likewise.
1015 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
1016 cts_offset.
1017 (ctf_simple_open): Likewise.
1018 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
1019 * Makefile.in: Regenerate.
1020 * aclocal.m4: Likewise.
1021 * config.h: Likewise.
1022 * configure: Likewise.
1023
1024 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1025
1026 * configure.in: Check for bfd_section_from_elf_index.
1027 * configure: Regenerate.
1028 * config.h.in [HAVE_BFD_ELF]: Likewise.
1029 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
1030 abfd is potentially unused now.
1031
1032 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1033
1034 * Makefile.am: New.
1035 * Makefile.in: Regenerated.
1036 * config.h.in: Likewise.
1037 * aclocal.m4: Likewise.
1038 * configure: Likewise.
1039
1040 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1041
1042 * ctf-dump.c: New.
1043
1044 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1045
1046 * ctf-labels.c: New.
1047
1048 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1049
1050 * ctf-impl.h (_libctf_version): New declaration.
1051 * ctf-subr.c (_libctf_version): Define it.
1052 (ctf_version): New.
1053
1054 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1055
1056 * ctf-create.c (enumcmp): New.
1057 (enumadd): Likewise.
1058 (membcmp): Likewise.
1059 (membadd): Likewise.
1060 (ctf_add_type): Likewise.
1061
1062 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1063
1064 * ctf-lookup.c (isqualifier): New.
1065 (ctf_lookup_by_name): Likewise.
1066 (struct ctf_lookup_var_key): Likewise.
1067 (ctf_lookup_var): Likewise.
1068 (ctf_lookup_variable): Likewise.
1069 (ctf_lookup_symbol_name): Likewise.
1070 (ctf_lookup_by_symbol): Likewise.
1071 (ctf_func_info): Likewise.
1072 (ctf_func_args): Likewise.
1073
1074 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1075
1076 * ctf-decl.c: New file.
1077 * ctf-types.c: Likewise.
1078 * ctf-impl.h: New declarations.
1079
1080 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1081
1082 * ctf-open-bfd.c: New file.
1083 * ctf-open.c (ctf_close): New.
1084 * ctf-impl.h: Include bfd.h.
1085 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
1086 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
1087 ctfi_bfd_close.
1088 (ctf_bfdopen_ctfsect): New declaration.
1089 (_CTF_SECTION): likewise.
1090
1091 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1092
1093 * ctf-archive.c: New.
1094 * ctf-impl.h (ctf_archive_internal): New type.
1095 (ctf_arc_open_internal): New declaration.
1096 (ctf_arc_bufopen): Likewise.
1097 (ctf_arc_close_internal): Likewise.
1098
1099 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1100
1101 * ctf-open.c: New file.
1102 * swap.h: Likewise.
1103
1104 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1105
1106 * ctf-create.c: New file.
1107 * ctf-lookup.c: New file.
1108
1109 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1110
1111 * ctf-impl.h: New definitions and declarations for type creation
1112 and lookup.
1113
1114 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1115
1116 * ctf-hash.c: New file.
1117 * ctf-impl.h: New declarations.
1118
1119 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1120
1121 * ctf-error.c: New file.
1122
1123 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1124
1125 * ctf-util.c: New file.
1126 * elf.h: Likewise.
1127 * ctf-impl.h: Include it, and add declarations.
1128
1129 2019-05-28 Nick Alcock <nick.alcock@oracle.com>
1130
1131 * ctf-impl.h: New file.
1132 * ctf-subr.c: New file.
1133
1134 \f
1135 Local Variables:
1136 mode: change-log
1137 left-margin: 8
1138 fill-column: 76
1139 version-control: never
1140 End:
This page took 0.05261 seconds and 4 git commands to generate.