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