libctf: handle nonrepresentable types at link time
[deliverable/binutils-gdb.git] / libctf / ChangeLog
CommitLineData
791915db
NA
12019-08-05 Nick Alcock <nick.alcock@oracle.com>
2
3 * ctf-types.c (ctf_type_resolve): Return ECTF_NONREPRESENTABLE on
4 type zero.
5 * ctf-create.c (ctf_add_type): Detect and skip nonrepresentable
6 members and types.
7 (ctf_add_variable): Likewise for variables pointing to them.
8 * ctf-link.c (ctf_link_one_type): Do not warn for nonrepresentable
9 type link failure, but do warn for others.
10 * ctf-dump.c (ctf_dump_format_type): Likewise. Do not assume all
11 errors to be ENOMEM.
12 (ctf_dump_member): Likewise.
13 (ctf_dump_type): Likewise.
14 (ctf_dump_header_strfield): Do not assume all errors to be ENOMEM.
15 (ctf_dump_header_sectfield): Do not assume all errors to be ENOMEM.
16 (ctf_dump_header): Likewise.
17 (ctf_dump_label): likewise.
18 (ctf_dump_objts): likewise.
19 (ctf_dump_funcs): likewise.
20 (ctf_dump_var): likewise.
21 (ctf_dump_str): Likewise.
22
87279e3c
NA
232019-09-30 Nick Alcock <nick.alcock@oracle.com>
24
25 * configure.ac (AC_DISABLE_SHARED): New, like opcodes/.
26 (LT_INIT): Likewise.
27 (AM_INSTALL_LIBBFD): Likewise.
28 (dlopen): Note why this is necessary in a comment.
29 (SHARED_LIBADD): Initialize for possibly-PIC libiberty: derived from
30 opcodes/.
31 (SHARED_LDFLAGS): Likewise.
32 (BFD_LIBADD): Likewise, for libbfd.
33 (BFD_DEPENDENCIES): Likewise.
34 (VERSION_FLAGS): Initialize, using a version script if ld supports
35 one, or libtool -export-symbols-regex otherwise.
36 (AC_CONFIG_MACRO_DIR): Add ../BFD.
37 * Makefile.am (ACLOCAL_AMFLAGS): Likewise.
38 (INCDIR): New.
39 (AM_CPPFLAGS): Use $(srcdir), not $(top_srcdir).
40 (noinst_LIBRARIES): Replace with...
41 [INSTALL_LIBBFD] (lib_LTLIBRARIES): This, or...
42 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES): ... this, mentioning new
43 libctf-nobfd.la as well.
44 [INSTALL_LIBCTF] (include_HEADERS): Add the CTF headers.
45 [!INSTALL_LIBCTF] (include_HEADERS): New, empty.
46 (libctf_a_SOURCES): Rename to...
47 (libctf_nobfd_la_SOURCES): ... this, all of libctf other than
48 ctf-open-bfd.c.
49 (libctf_la_SOURCES): Now derived from libctf_nobfd_la_SOURCES,
50 with ctf-open-bfd.c added.
51 (libctf_nobfd_la_LIBADD): New, using @SHARED_LIBADD@.
52 (libctf_la_LIBADD): New, using @BFD_LIBADD@ as well.
53 (libctf_la_DEPENDENCIES): New, using @BFD_DEPENDENCIES@.
54 * Makefile.am [INSTALL_LIBCTF]: Use it.
55 * aclocal.m4: Add ../bfd/acinclude.m4, ../config/acx.m4, and the
56 libtool macros.
57 * libctf.ver: New, everything is version LIBCTF_1.0 currently (even
58 the unstable components).
59 * Makefile.in: Regenerated.
60 * config.h.in: Likewise.
61 * configure: Likewise.
62
632019-07-30 Nick Alcock <nick.alcock@oracle.com>
64
65 * configure.ac (INSTALL_LIBCTF): New, controlled by
66 --enable-install-libctf.
67 [INSTALL_LIBCTF] (lib_LIBRARIES): Add libctf.a.
68 * Makefile.in: Regenerated.
69 * configure: Regenerated.
70
f046147d
NA
712019-07-30 Nick Alcock <nick.alcock@oracle.com>
72
73 * ctf-archive.c (ctf_arc_close): Call ctfi_bfd_close if set.
74 * ctf-open-bfd.c (ctf_bfdclose): Fix comment.
75
edc8bbe9
NA
762019-07-30 Nick Alcock <nick.alcock@oracle.com>
77
78 * ctf-open-bfd.c (ctf_fdopen): Call bfd_set_cacheable.
79
7e97445a
NA
802019-07-13 Nick Alcock <nick.alcock@oracle.com>
81
82 * ctf-impl.h (includes): Include <sys/param.h> here.
83
5ae6af75
NA
842019-07-30 Nick Alcock <nick.alcock@oracle.com>
85
86 * ctf-open.c (flip_lbls): Eschew for-loop initial declarations.
87 (flip_objts): Likewise.
88 (flip_vars): Likewise.
89 (flip_types): Likewise.
90
1820745a
NA
912019-07-30 Nick Alcock <nick.alcock@oracle.com>
92
93 * ctf-hash.c (ctf_hashtab_insert): Pass in the key and value
94 freeing functions: if set, free the key and value if the slot
95 already exists. Always reassign the key.
96 (ctf_dynhash_insert): Adjust call appropriately.
97 (ctf_hash_insert_type): Likewise.
98
5de9eada
NA
992019-08-03 Nick Alcock <nick.alcock@oracle.com>
100
101 * ctf-create.c (ctf_add_type): Look up and use the forwarded-to
102 type kind. Allow forwards to unify with pre-existing structs/
103 unions/enums.
104
49ea9b45
NA
1052019-07-30 Nick Alcock <nick.alcock@oracle.com>
106
107 * ctf-impl.h (ctf_file_t) <ctf_link_cu_mappping>: New.
108 <ctf_link_memb_name_changer>: Likewise.
109 <ctf_link_memb_name_changer_arg>: Likewise.
110 * ctf-create.c (ctf_update): Update accordingly.
111 * ctf-open.c (ctf_file_close): Likewise.
112 * ctf-link.c (ctf_create_per_cu): Apply the cu mapping.
113 (ctf_link_add_cu_mapping): New.
114 (ctf_link_set_memb_name_changer): Likewise.
115 (ctf_change_parent_name): New.
116 (ctf_name_list_accum_cb_arg_t) <dynames>: New, storage for names
117 allocated by the caller's ctf_link_memb_name_changer.
118 <ndynames>: Likewise.
119 (ctf_accumulate_archive_names): Call the ctf_link_memb_name_changer.
120 (ctf_link_write): Likewise (for _CTF_SECTION only): also call
121 ctf_change_parent_name. Free any resulting names.
122
eabb7154
NA
1232019-07-13 Nick Alcock <nick.alcock@oracle.com>
124
125 * ctf-link.c (ctf_create_per_cu): New, refactored out of...
126 (ctf_link_one_type): ... here, with parent-name setting added.
127 (check_variable): New.
128 (ctf_link_one_variable): Likewise.
129 (ctf_link_one_input_archive_member): Call it.
130 * ctf-error.c (_ctf_errlist): Updated with new errors.
131
886453cb
NA
1322019-07-13 Nick Alcock <nick.alcock@oracle.com>
133
134 * ctf-impl.h (ctf_file_t): New field ctf_link_type_mapping.
135 (struct ctf_link_type_mapping_key): New.
136 (ctf_hash_type_mapping_key): Likewise.
137 (ctf_hash_eq_type_mapping_key): Likewise.
138 (ctf_add_type_mapping): Likewise.
139 (ctf_type_mapping): Likewise.
140 (ctf_dynhash_empty): Likewise.
141 * ctf-open.c (ctf_file_close): Update accordingly.
142 * ctf-create.c (ctf_update): Likewise.
143 (ctf_add_type): Populate the mapping.
144 * ctf-hash.c (ctf_hash_type_mapping_key): Hash a type mapping key.
145 (ctf_hash_eq_type_mapping_key): Check the key for equality.
146 (ctf_dynhash_insert): Fix comment typo.
147 (ctf_dynhash_empty): New.
148 * ctf-link.c (ctf_add_type_mapping): New.
149 (ctf_type_mapping): Likewise.
150 (empty_link_type_mapping): New.
151 (ctf_link_one_input_archive): Call it.
152
72c83edd
NA
1532019-07-13 Nick Alcock <nick.alcock@oracle.com>
154
155 * ctf-link.c: New file, linking of the string and type sections.
156 * Makefile.am (libctf_a_SOURCES): Add it.
157 * Makefile.in: Regenerate.
158
159 * ctf-impl.h (ctf_file_t): New fields ctf_link_inputs,
160 ctf_link_outputs.
161 * ctf-create.c (ctf_update): Update accordingly.
162 * ctf-open.c (ctf_file_close): Likewise.
163 * ctf-error.c (_ctf_errlist): Updated with new errors.
164
d18f9f16
NA
1652019-07-13 Nick Alcock <nick.alcock@oracle.com>
166
167 * ctf-dump.c (ctf_dump_funcs): Check the right error value.
168
b4f0e09c
NA
1692019-07-13 Nick Alcock <nick.alcock@oracle.com>
170
171 * ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not
172 ctf_type_iter.
173 (ctf_dump_type): Pass down the flag from ctf_type_iter_all.
174 (ctf_dump_format_type): Add non-root-type { } notation.
175 Add root flag to prototype.
176 (ctf_dump_label): Adjust accordingly.
177 (ctf_dump_objts): Likewise.
178 (ctf_dump_var): Likewise.
179
3dde2c91
NA
1802019-07-13 Nick Alcock <nick.alcock@oracle.com>
181
182 * ctf-create.c (ctf_compress_write): Fix double-free.
183
5537f9b9
NA
1842019-07-13 Nick Alcock <nick.alcock@oracle.com>
185
186 * ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
187 of...
188 (ctf_arc_write_fd): ... this new function.
189 * ctf-create.c (ctf_write_mem): New.
190
d851ecd3
NA
1912019-07-13 Nick Alcock <nick.alcock@oracle.com>
192
193 * ctf-impl.h (ctf_str_atom_t) <csa_offset>: New field.
194 (ctf_file_t) <ctf_syn_ext_strtab>: Likewise.
195 (ctf_str_add_ref): Name the last arg.
196 (ctf_str_add_external) New.
197 (ctf_str_add_strraw_explicit): Likewise.
198 (ctf_simple_open_internal): Likewise.
199 (ctf_bufopen_internal): Likewise.
200
201 * ctf-string.c (ctf_strraw_explicit): Split from...
202 (ctf_strraw): ... here, with new support for ctf_syn_ext_strtab.
203 (ctf_str_add_ref_internal): Return the atom, not the
204 string.
205 (ctf_str_add): Adjust accordingly.
206 (ctf_str_add_ref): Likewise. Move up in the file.
207 (ctf_str_add_external): New: update the csa_offset.
208 (ctf_str_count_strtab): Only account for strings with no csa_offset
209 in the internal strtab length.
210 (ctf_str_write_strtab): If the csa_offset is set, update the
211 string's refs without writing the string out, and update the
212 ctf_syn_ext_strtab. Make OOM handling less ugly.
213 * ctf-create.c (struct ctf_sort_var_arg_cb): New.
214 (ctf_update): Handle failure to populate the strtab. Pass in the
215 new ctf_sort_var arg. Adjust for ctf_syn_ext_strtab addition.
216 Call ctf_simple_open_internal, not ctf_simple_open.
217 (ctf_sort_var): Call ctf_strraw_explicit rather than looking up
218 strings by hand.
219 * ctf-hash.c (ctf_hash_insert_type): Likewise (but using
220 ctf_strraw). Adjust to diagnose ECTF_STRTAB nonetheless.
221 * ctf-open.c (init_types): No longer filter out ECTF_STRTAB.
222 (ctf_file_close): Destroy the ctf_syn_ext_strtab.
223 (ctf_simple_open): Rename to, and reimplement as a wrapper around...
224 (ctf_simple_open_internal): ... this new function, which calls
225 ctf_bufopen_internal.
226 (ctf_bufopen): Rename to, and reimplement as a wrapper around...
227 (ctf_bufopen_internal): ... this new function, which sets
228 ctf_syn_ext_strtab.
229
0ac62312
NA
2302019-07-13 Nick Alcock <nick.alcock@oracle.com>
231
232 * ctf_types.c (ctf_type_iter_all): New.
233
2db912ba
NA
2342019-07-13 Nick Alcock <nick.alcock@oracle.com>
235
236 * ctf-open.c (init_symtab): Check for overflow against the right
237 section.
238 (upgrade_header): Set cth_objtidxoff, cth_funcidxoff to zero-length.
239 (upgrade_types_v1): Note that these sections are not checked.
240 (flip_header): Endian-swap the header fields.
241 (flip_ctf): Endian-swap the sections.
242 (flip_objts): Update comment.
243 (ctf_bufopen): Check header offsets and alignment for validity.
244
6d5944fc
NA
2452019-07-13 Nick Alcock <nick.alcock@oracle.com>
246
247 * ctf-open-bfd.c: Add <assert.h>.
248 (ctf_bfdopen_ctfsect): Open string and symbol tables using
249 techniques borrowed from bfd_elf_sym_name.
250 (ctf_new_archive_internal): Improve comment.
251 * ctf-archive.c (ctf_arc_close): Do not free the ctfi_strsect.
252 * ctf-open.c (ctf_bufopen): Allow opening with a string section but
253 no symbol section, but not vice versa.
254
9b32cba4
NA
2552019-07-08 Nick Alcock <nick.alcock@oracle.com>
256
257 * ctf-impl.h (ctf_file_t): New field ctf_openflags.
258 * ctf-open.c (ctf_bufopen): Set it. No longer dump header offsets.
259 * ctf-dump.c (dump_header): New function, dump the CTF header.
260 (ctf_dump): Call it.
261 (ctf_dump_header_strfield): New function.
262 (ctf_dump_header_sectfield): Likewise.
263
fd55eae8
NA
2642019-07-06 Nick Alcock <nick.alcock@oracle.com>
265
266 * ctf-impl.h (ctf_file_t): New fields ctf_header, ctf_dynbase,
267 ctf_cuname, ctf_dyncuname: ctf_base and ctf_buf are no longer const.
268 * ctf-open.c (ctf_set_base): Preserve the gap between ctf_buf and
269 ctf_base: do not assume that it is always sizeof (ctf_header_t).
270 Print out ctf_cuname: only print out ctf_parname if set.
271 (ctf_free_base): Removed, ctf_base is no longer freed: free
272 ctf_dynbase instead.
273 (ctf_set_version): Fix spacing.
274 (upgrade_header): New, in-place header upgrading.
275 (upgrade_types): Rename to...
276 (upgrade_types_v1): ... this. Free ctf_dynbase, not ctf_base. No
277 longer track old and new headers separately. No longer allow for
278 header sizes explicitly: squeeze the headers out on upgrade (they
279 are preserved in fp->ctf_header). Set ctf_dynbase, ctf_base and
280 ctf_buf explicitly. Use ctf_free, not ctf_free_base.
281 (upgrade_types): New, also handle ctf_parmax updating.
282 (flip_header): Flip ctf_cuname.
283 (flip_types): Flip BUF explicitly rather than deriving BUF from
284 BASE.
285 (ctf_bufopen): Store the header in fp->ctf_header. Correct minimum
286 required alignment of objtoff and funcoff. No longer store it in
287 the ctf_buf unless that buf is derived unmodified from the input.
288 Set ctf_dynbase where ctf_base is dynamically allocated. Drop locals
289 that duplicate fields in ctf_file: move allocation of ctf_file
290 further up instead. Call upgrade_header as needed. Move
291 version-specific ctf_parmax initialization into upgrade_types. More
292 concise error handling.
293 (ctf_file_close): No longer test for null pointers before freeing.
294 Free ctf_dyncuname, ctf_dynbase, and ctf_header. Do not call
295 ctf_free_base.
296 (ctf_cuname): New.
297 (ctf_cuname_set): New.
298 * ctf-create.c (ctf_update): Populate ctf_cuname.
299 (ctf_gzwrite): Write out the header explicitly. Remove obsolescent
300 comment.
301 (ctf_write): Likewise.
302 (ctf_compress_write): Get the header from ctf_header, not ctf_base.
303 Fix the compression length: fp->ctf_size never counted the CTF
304 header. Simplify the compress call accordingly.
305
a2230b5e
HPN
3062019-07-11 Hans-Peter Nilsson <hp@bitrange.com>
307
308 * ctf-endian.h: Don't assume htole64 and le64toh are always
309 present if HAVE_ENDIAN_H; also check if htole64 is defined.
310 [!WORDS_BIGENDIAN] (htole64, le64toh): Define as identity,
311 not bswap_identity_64.
312
fd361982
AM
3132019-09-18 Alan Modra <amodra@gmail.com>
314
315 * ctf-open-bfd.c: Update throughout for bfd section macro changes.
316
60391a25
PB
3172019-09-09 Phil Blundell <pb@pbcl.net>
318
319 binutils 2.33 branch created.
320
12a0b67d
NA
3212019-07-18 Nick Alcock <nick.alcock@oracle.com>
322
323 * ctf-types.c (ctf_type_aname_raw): New.
324 (ctf_func_type_info): Likewise.
325 (ctf_func_type_args): Likewise.
326 * ctf-error.c (_ctf_errlist): Fix description.
327 * ctf-lookup.c: Fix file description.
328
083114f8 3292019-06-28 Nick Alcock <nick.alcock@oracle.com>
f57cf0e3
NA
330
331 * ctf-create.c (ctf_create): Fix off-by-one error.
332
083114f8 3332019-06-28 Nick Alcock <nick.alcock@oracle.com>
f5e9c9bd
NA
334
335 * ctf-impl.h: (struct ctf_strs_writable): New, non-const version of
336 struct ctf_strs.
337 (struct ctf_dtdef): Note that dtd_data.ctt_name is unpopulated.
338 (struct ctf_str_atom): New, disambiguated single string.
339 (struct ctf_str_atom_ref): New, points to some other location that
340 references this string's offset.
341 (struct ctf_file): New members ctf_str_atoms and ctf_str_num_refs.
342 Remove member ctf_dtvstrlen: we no longer track the total strlen
343 as we add strings.
344 (ctf_str_create_atoms): Declare new function in ctf-string.c.
345 (ctf_str_free_atoms): Likewise.
346 (ctf_str_add): Likewise.
347 (ctf_str_add_ref): Likewise.
348 (ctf_str_rollback): Likewise.
349 (ctf_str_purge_refs): Likewise.
350 (ctf_str_write_strtab): Likewise.
351 (ctf_realloc): Declare new function in ctf-util.c.
352
353 * ctf-open.c (ctf_bufopen): Create the atoms table.
354 (ctf_file_close): Destroy it.
355 * ctf-create.c (ctf_update): Copy-and-free it on update. No longer
356 special-case the position of the parname string. Construct the
357 strtab by calling ctf_str_add_ref and ctf_str_write_strtab after the
358 rest of each buffer element is constructed, not via open-coding:
359 realloc the CTF buffer and append the strtab to it. No longer
360 maintain ctf_dtvstrlen. Sort the variable entry table later, after
361 strtab construction.
362 (ctf_copy_membnames): Remove: integrated into ctf_copy_{s,l,e}members.
363 (ctf_copy_smembers): Drop the string offset: call ctf_str_add_ref
364 after buffer element construction instead.
365 (ctf_copy_lmembers): Likewise.
366 (ctf_copy_emembers): Likewise.
367 (ctf_create): No longer maintain the ctf_dtvstrlen.
368 (ctf_dtd_delete): Likewise.
369 (ctf_dvd_delete): Likewise.
370 (ctf_add_generic): Likewise.
371 (ctf_add_enumerator): Likewise.
372 (ctf_add_member_offset): Likewise.
373 (ctf_add_variable): Likewise.
374 (membadd): Likewise.
375 * ctf-util.c (ctf_realloc): New, wrapper around realloc that aborts
376 if there are active ctf_str_num_refs.
377 (ctf_strraw): Move to ctf-string.c.
378 (ctf_strptr): Likewise.
379 * ctf-string.c: New file, strtab manipulation.
380
381 * Makefile.am (libctf_a_SOURCES): Add it.
382 * Makefile.in: Regenerate.
383
083114f8 3842019-06-28 Nick Alcock <nick.alcock@oracle.com>
9658dc39
NA
385
386 * ctf-impl.h (ctf_hash_iter_f): New.
387 (ctf_dynhash_iter): New declaration.
388 (ctf_dynhash_iter_remove): New declaration.
389 * ctf-hash.c (ctf_dynhash_iter): Define.
390 (ctf_dynhash_iter_remove): Likewise.
391 (ctf_hashtab_traverse): New.
392 (ctf_hashtab_traverse_remove): Likewise.
393 (struct ctf_traverse_cb_arg): Likewise.
394 (struct ctf_traverse_remove_cb_arg): Likewise.
395
083114f8 3962019-06-28 Nick Alcock <nick.alcock@oracle.com>
3e10cffc
NA
397
398 * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
399
083114f8 4002019-06-28 Nick Alcock <nick.alcock@oracle.com>
c550e7ba
NA
401
402 * ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
403 (ctf_dump_funcs): Likewise.
404
083114f8 4052019-06-19 Nick Alcock <nick.alcock@oracle.com>
cf02c44d
NA
406
407 * ctf-open-bfd.c: Add swap.h and ctf-endian.h.
408 (ctf_fdopen): Check for endian-swapped raw CTF magic, and
409 little-endian CTF archive magic. Do not check the CTF version:
410 ctf_simple_open does that in endian-safe ways. Do not dereference
411 null pointers on open failure.
412
083114f8 4132019-06-19 Nick Alcock <nick.alcock@oracle.com>
7cee1826
NA
414
415 * ctf-open.c (get_vbytes_common): Return the new slice size.
416 (ctf_bufopen): Flip the endianness of the CTF-section header copy.
417 Remember to copy in the CTF data when opening an uncompressed
418 foreign-endian CTF file. Prune useless variable manipulation.
419
083114f8 4202019-06-19 Nick Alcock <nick.alcock@oracle.com>
0b4fa56e
NA
421
422 * ctf-open.c (ctf_types): Fail when unidentified type kinds are
423 seen.
424
083114f8 4252019-06-19 Nick Alcock <nick.alcock@oracle.com>
364620bf
NA
426
427 * ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
428 output.
429
083114f8 4302019-06-19 Nick Alcock <nick.alcock@oracle.com>
65365aa8
NA
431
432 * ctf-subr.c (_PAGESIZE): Remove.
433 (ctf_data_alloc): Likewise.
434 (ctf_data_free): Likewise.
435 (ctf_data_protect): Likewise.
436 * ctf-impl.h: Remove declarations.
437 * ctf-create.c (ctf_update): No longer call ctf_data_protect: use
438 ctf_free, not ctf_data_free.
439 (ctf_compress_write): Use ctf_data_alloc, not ctf_alloc. Free
440 the buffer again on compression error.
441 * ctf-open.c (ctf_set_base): No longer track the size: call
442 ctf_free, not ctf_data_free.
443 (upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
444 (ctf_bufopen): Likewise. No longer call ctf_data_protect.
445
083114f8 4462019-06-19 Nick Alcock <nick.alcock@oracle.com>
24865428
NA
447
448 * ctf-create.c (ctf_dtd_insert): Pass on error returns from
449 ctf_dynhash_insert.
450 (ctf_dvd_insert): Likewise.
451 (ctf_add_generic): Likewise.
452 (ctf_add_variable): Likewise.
453 * ctf-impl.h: Adjust declarations.
454
3a3a077c
AM
4552019-06-14 Alan Modra <amodra@gmail.com>
456
457 * configure: Regenerate.
458
942d35f7
NA
4592019-06-06 Nick Alcock <nick.alcock@oracle.com>
460
461 * ctf-decls.h: Include <libiberty.h>.
462 * ctf-lookup.c (ctf_lookup_by_name): Call xstrndup(), not strndup().
463
595a4d43
NA
4642019-06-06 Nick Alcock <nick.alcock@oracle.com>
465
466 * ctf-dump.c (ctf_dump_format_type): Cast size_t's used in printf()s.
467 (ctf_dump_objts): Likewise.
468 (ctf_dump_funcs): Likewise.
469 (ctf_dump_member): Likewise.
470 (ctf_dump_str): Likewise.
471
f5e73be1
NA
4722019-06-06 Nick Alcock <nick.alcock@oracle.com>
473
474 * ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
475 * ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
476
62d8e3b7
NA
4772019-06-05 Nick Alcock <nick.alcock@oracle.com>
478
479 * ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
480 (ctf_arc_open_by_offset): Likewise.
481 * ctf-create.c (ctf_add_type): Likewise.
482
76fad999
TT
4832019-06-04 Tom Tromey <tromey@adacore.com>
484
485 * ctf-create.c (ctf_add_encoded, ctf_add_slice)
486 (ctf_add_member_offset): Use CHAR_BIT, not NBBY.
487
ad118caa
NA
4882019-06-04 Nick Alcock <nick.alcock@oracle.com>
489
490 * configure.ac: Check for O_CLOEXEC.
491 * ctf-decls.h (O_CLOEXEC): Define (to 0), if need be.
492 * config.h.in: Regenerate.
493 * configure: Likewise.
494
6b22174f
NA
4952019-06-04 Nick Alcock <nick.alcock@oracle.com>
496
497 * qsort_r.c: Rename to...
498 * ctf-qsort_r.c: ... this.
499 (_quicksort): Define to ctf_qsort_r.
500 * ctf-decls.h (qsort_r): Remove.
501 (ctf_qsort_r): Add.
502 (struct ctf_qsort_arg): New, transport the real ARG and COMPAR.
503 (ctf_qsort_compar_thunk): Rearrange the arguments to COMPAR.
504 * Makefile.am (libctf_a_LIBADD): Remove.
505 (libctf_a_SOURCES): New, add ctf-qsort_r.c.
506 * ctf-archive.c (ctf_arc_write): Call ctf_qsort_r, not qsort_r.
507 * ctf-create.c (ctf_update): Likewise.
508 * configure.ac: Check for BSD versus GNU qsort_r signature.
509 * Makefile.in: Regenerate.
510 * config.h.in: Likewise.
511 * configure: Likewise.
512
941accce
NA
5132019-06-03 Nick Alcock <nick.alcock@oracle.com>
514
515 * ctf-dump.c (ctf_dump_funcs): Free in the right place.
516
a0486bac
JM
5172019-05-29 Nick Alcock <nick.alcock@oracle.com>
518
519 * Makefile.am (ZLIB): New.
520 (ZLIBINC): Likewise.
521 (AM_CFLAGS): Use them.
522 (libctf_a_LIBADD): New, for LIBOBJS.
523 * configure.ac: Check for zlib, endian.h, and qsort_r.
524 * ctf-endian.h: New, providing htole64 and le64toh.
525 * swap.h: Code style fixes.
526 (bswap_identity_64): New.
527 * qsort_r.c: New, from gnulib (with one added #include).
528 * ctf-decls.h: New, providing a conditional qsort_r declaration,
529 and unconditional definitions of MIN and MAX.
530 * ctf-impl.h: Use it. Do not use <sys/errno.h>.
531 (ctf_set_errno): Now returns unsigned long.
532 * ctf-util.c (ctf_set_errno): Adjust here too.
533 * ctf-archive.c: Use ctf-endian.h.
534 (ctf_arc_open_by_offset): Use memset, not bzero. Drop cts_type,
535 cts_flags and cts_offset.
536 (ctf_arc_write): Drop debugging dependent on the size of off_t.
537 * ctf-create.c: Provide a definition of roundup if not defined.
538 (ctf_create): Drop cts_type, cts_flags and cts_offset.
539 (ctf_add_reftype): Do not check if type IDs are below zero.
540 (ctf_add_slice): Likewise.
541 (ctf_add_typedef): Likewise.
542 (ctf_add_member_offset): Cast error-returning ssize_t's to size_t
543 when known error-free. Drop CTF_ERR usage for functions returning
544 int.
545 (ctf_add_member_encoded): Drop CTF_ERR usage for functions returning
546 int.
547 (ctf_add_variable): Likewise.
548 (enumcmp): Likewise.
549 (enumadd): Likewise.
550 (membcmp): Likewise.
551 (ctf_add_type): Likewise. Cast error-returning ssize_t's to size_t
552 when known error-free.
553 * ctf-dump.c (ctf_is_slice): Drop CTF_ERR usage for functions
554 returning int: use CTF_ERR for functions returning ctf_type_id.
555 (ctf_dump_label): Likewise.
556 (ctf_dump_objts): Likewise.
557 * ctf-labels.c (ctf_label_topmost): Likewise.
558 (ctf_label_iter): Likewise.
559 (ctf_label_info): Likewise.
560 * ctf-lookup.c (ctf_func_args): Likewise.
561 * ctf-open.c (upgrade_types): Cast to size_t where appropriate.
562 (ctf_bufopen): Likewise. Use zlib types as needed.
563 * ctf-types.c (ctf_member_iter): Drop CTF_ERR usage for functions
564 returning int.
565 (ctf_enum_iter): Likewise.
566 (ctf_type_size): Likewise.
567 (ctf_type_align): Likewise. Cast to size_t where appropriate.
568 (ctf_type_kind_unsliced): Likewise.
569 (ctf_type_kind): Likewise.
570 (ctf_type_encoding): Likewise.
571 (ctf_member_info): Likewise.
572 (ctf_array_info): Likewise.
573 (ctf_enum_value): Likewise.
574 (ctf_type_rvisit): Likewise.
575 * ctf-open-bfd.c (ctf_bfdopen): Drop cts_type, cts_flags and
576 cts_offset.
577 (ctf_simple_open): Likewise.
578 (ctf_bfdopen_ctfsect): Likewise. Set cts_size properly.
579 * Makefile.in: Regenerate.
580 * aclocal.m4: Likewise.
581 * config.h: Likewise.
582 * configure: Likewise.
583
9698cf9b
NA
5842019-05-28 Nick Alcock <nick.alcock@oracle.com>
585
586 * configure.in: Check for bfd_section_from_elf_index.
587 * configure: Regenerate.
588 * config.h.in [HAVE_BFD_ELF]: Likewise.
589 * libctf/ctf_open_bfd (ctf_bfdopen_ctfsect): Use it.
590 abfd is potentially unused now.
591
0e65dfba
NA
5922019-05-28 Nick Alcock <nick.alcock@oracle.com>
593
594 * Makefile.am: New.
595 * Makefile.in: Regenerated.
596 * config.h.in: Likewise.
597 * aclocal.m4: Likewise.
598 * configure: Likewise.
599
a30b3e18
NA
6002019-05-28 Nick Alcock <nick.alcock@oracle.com>
601
602 * ctf-dump.c: New.
603
6dbf2b73
NA
6042019-05-28 Nick Alcock <nick.alcock@oracle.com>
605
606 * ctf-labels.c: New.
607
6c33b742
NA
6082019-05-28 Nick Alcock <nick.alcock@oracle.com>
609
610 * ctf-impl.h (_libctf_version): New declaration.
611 * ctf-subr.c (_libctf_version): Define it.
612 (ctf_version): New.
613
c499eb68
NA
6142019-05-28 Nick Alcock <nick.alcock@oracle.com>
615
616 * ctf-create.c (enumcmp): New.
617 (enumadd): Likewise.
618 (membcmp): Likewise.
619 (membadd): Likewise.
620 (ctf_add_type): Likewise.
621
b437bfe0
NA
6222019-05-28 Nick Alcock <nick.alcock@oracle.com>
623
624 * ctf-lookup.c (isqualifier): New.
625 (ctf_lookup_by_name): Likewise.
626 (struct ctf_lookup_var_key): Likewise.
627 (ctf_lookup_var): Likewise.
628 (ctf_lookup_variable): Likewise.
629 (ctf_lookup_symbol_name): Likewise.
630 (ctf_lookup_by_symbol): Likewise.
631 (ctf_func_info): Likewise.
632 (ctf_func_args): Likewise.
633
316afdb1
NA
6342019-05-28 Nick Alcock <nick.alcock@oracle.com>
635
636 * ctf-decl.c: New file.
637 * ctf-types.c: Likewise.
638 * ctf-impl.h: New declarations.
639
143dce84
NA
6402019-05-28 Nick Alcock <nick.alcock@oracle.com>
641
642 * ctf-open-bfd.c: New file.
643 * ctf-open.c (ctf_close): New.
644 * ctf-impl.h: Include bfd.h.
645 (ctf_file): New members ctf_data_mmapped, ctf_data_mmapped_len.
646 (ctf_archive_internal): New members ctfi_abfd, ctfi_data,
647 ctfi_bfd_close.
648 (ctf_bfdopen_ctfsect): New declaration.
649 (_CTF_SECTION): likewise.
650
9402cc59
NA
6512019-05-28 Nick Alcock <nick.alcock@oracle.com>
652
653 * ctf-archive.c: New.
654 * ctf-impl.h (ctf_archive_internal): New type.
655 (ctf_arc_open_internal): New declaration.
656 (ctf_arc_bufopen): Likewise.
657 (ctf_arc_close_internal): Likewise.
658
72f33921
NA
6592019-05-28 Nick Alcock <nick.alcock@oracle.com>
660
661 * ctf-open.c: New file.
662 * swap.h: Likewise.
663
47d546f4
NA
6642019-05-28 Nick Alcock <nick.alcock@oracle.com>
665
666 * ctf-create.c: New file.
667 * ctf-lookup.c: New file.
668
a5be9bbe
NA
6692019-05-28 Nick Alcock <nick.alcock@oracle.com>
670
671 * ctf-impl.h: New definitions and declarations for type creation
672 and lookup.
673
c0754cdd
NA
6742019-05-28 Nick Alcock <nick.alcock@oracle.com>
675
676 * ctf-hash.c: New file.
677 * ctf-impl.h: New declarations.
678
479604f4
NA
6792019-05-28 Nick Alcock <nick.alcock@oracle.com>
680
681 * ctf-error.c: New file.
682
94585e7f
NA
6832019-05-28 Nick Alcock <nick.alcock@oracle.com>
684
685 * ctf-util.c: New file.
686 * elf.h: Likewise.
687 * ctf-impl.h: Include it, and add declarations.
688
60da9d95
NA
6892019-05-28 Nick Alcock <nick.alcock@oracle.com>
690
691 * ctf-impl.h: New file.
692 * ctf-subr.c: New file.
693
694\f
695Local Variables:
696mode: change-log
697left-margin: 8
698fill-column: 76
699version-control: never
700End:
This page took 0.066994 seconds and 4 git commands to generate.