+2019-07-08 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf-impl.h (ctf_file_t): New field ctf_openflags.
+ * ctf-open.c (ctf_bufopen): Set it. No longer dump header offsets.
+ * ctf-dump.c (dump_header): New function, dump the CTF header.
+ (ctf_dump): Call it.
+ (ctf_dump_header_strfield): New function.
+ (ctf_dump_header_sectfield): Likewise.
+
+2019-07-06 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf-impl.h (ctf_file_t): New fields ctf_header, ctf_dynbase,
+ ctf_cuname, ctf_dyncuname: ctf_base and ctf_buf are no longer const.
+ * ctf-open.c (ctf_set_base): Preserve the gap between ctf_buf and
+ ctf_base: do not assume that it is always sizeof (ctf_header_t).
+ Print out ctf_cuname: only print out ctf_parname if set.
+ (ctf_free_base): Removed, ctf_base is no longer freed: free
+ ctf_dynbase instead.
+ (ctf_set_version): Fix spacing.
+ (upgrade_header): New, in-place header upgrading.
+ (upgrade_types): Rename to...
+ (upgrade_types_v1): ... this. Free ctf_dynbase, not ctf_base. No
+ longer track old and new headers separately. No longer allow for
+ header sizes explicitly: squeeze the headers out on upgrade (they
+ are preserved in fp->ctf_header). Set ctf_dynbase, ctf_base and
+ ctf_buf explicitly. Use ctf_free, not ctf_free_base.
+ (upgrade_types): New, also handle ctf_parmax updating.
+ (flip_header): Flip ctf_cuname.
+ (flip_types): Flip BUF explicitly rather than deriving BUF from
+ BASE.
+ (ctf_bufopen): Store the header in fp->ctf_header. Correct minimum
+ required alignment of objtoff and funcoff. No longer store it in
+ the ctf_buf unless that buf is derived unmodified from the input.
+ Set ctf_dynbase where ctf_base is dynamically allocated. Drop locals
+ that duplicate fields in ctf_file: move allocation of ctf_file
+ further up instead. Call upgrade_header as needed. Move
+ version-specific ctf_parmax initialization into upgrade_types. More
+ concise error handling.
+ (ctf_file_close): No longer test for null pointers before freeing.
+ Free ctf_dyncuname, ctf_dynbase, and ctf_header. Do not call
+ ctf_free_base.
+ (ctf_cuname): New.
+ (ctf_cuname_set): New.
+ * ctf-create.c (ctf_update): Populate ctf_cuname.
+ (ctf_gzwrite): Write out the header explicitly. Remove obsolescent
+ comment.
+ (ctf_write): Likewise.
+ (ctf_compress_write): Get the header from ctf_header, not ctf_base.
+ Fix the compression length: fp->ctf_size never counted the CTF
+ header. Simplify the compress call accordingly.
+
+2019-07-11 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * ctf-endian.h: Don't assume htole64 and le64toh are always
+ present if HAVE_ENDIAN_H; also check if htole64 is defined.
+ [!WORDS_BIGENDIAN] (htole64, le64toh): Define as identity,
+ not bswap_identity_64.
+
+2019-09-18 Alan Modra <amodra@gmail.com>
+
+ * ctf-open-bfd.c: Update throughout for bfd section macro changes.
+
2019-09-09 Phil Blundell <pb@pbcl.net>
binutils 2.33 branch created.
* ctf-error.c (_ctf_errlist): Fix description.
* ctf-lookup.c: Fix file description.
-2019-06-28 Nick Alcock <nick.alcock@oracle.com>
+2019-06-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-create.c (ctf_create): Fix off-by-one error.
-2019-06-28 Nick Alcock <nick.alcock@oracle.com>
+2019-06-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-impl.h: (struct ctf_strs_writable): New, non-const version of
struct ctf_strs.
* Makefile.am (libctf_a_SOURCES): Add it.
* Makefile.in: Regenerate.
-2019-06-28 Nick Alcock <nick.alcock@oracle.com>
+2019-06-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-impl.h (ctf_hash_iter_f): New.
(ctf_dynhash_iter): New declaration.
(struct ctf_traverse_cb_arg): Likewise.
(struct ctf_traverse_remove_cb_arg): Likewise.
-2019-06-28 Nick Alcock <nick.alcock@oracle.com>
+2019-06-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
-2019-06-28 Nick Alcock <nick.alcock@oracle.com>
+2019-06-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
(ctf_dump_funcs): Likewise.
-2019-06-19 Nick Alcock <nick.alcock@oracle.com>
+2019-06-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-open-bfd.c: Add swap.h and ctf-endian.h.
(ctf_fdopen): Check for endian-swapped raw CTF magic, and
ctf_simple_open does that in endian-safe ways. Do not dereference
null pointers on open failure.
-2019-06-19 Nick Alcock <nick.alcock@oracle.com>
+2019-06-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-open.c (get_vbytes_common): Return the new slice size.
(ctf_bufopen): Flip the endianness of the CTF-section header copy.
Remember to copy in the CTF data when opening an uncompressed
foreign-endian CTF file. Prune useless variable manipulation.
-2019-06-19 Nick Alcock <nick.alcock@oracle.com>
+2019-06-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-open.c (ctf_types): Fail when unidentified type kinds are
seen.
-2019-06-19 Nick Alcock <nick.alcock@oracle.com>
+2019-06-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-open.c (ctf_bufopen): Dump header offsets into the debugging
output.
-2019-06-19 Nick Alcock <nick.alcock@oracle.com>
+2019-06-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-subr.c (_PAGESIZE): Remove.
(ctf_data_alloc): Likewise.
(upgrade_types): Likewise. Call ctf_alloc, not ctf_data_alloc.
(ctf_bufopen): Likewise. No longer call ctf_data_protect.
-2019-06-19 Nick Alcock <nick.alcock@oracle.com>
+2019-06-19 Nick Alcock <nick.alcock@oracle.com>
* ctf-create.c (ctf_dtd_insert): Pass on error returns from
ctf_dynhash_insert.