libctf: write CTF files to memory, and CTF archives to fds
authorNick Alcock <nick.alcock@oracle.com>
Sat, 13 Jul 2019 19:40:52 +0000 (20:40 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Thu, 3 Oct 2019 16:04:55 +0000 (17:04 +0100)
commit5537f9b9a3c46c3898e274a52f6bb0eb8d293bb8
tree3d1ac035f2c596d2fe567637f99f7380faab4ca6
parentd851ecd373a3764581372b10be5b74c9ee98ae08
libctf: write CTF files to memory, and CTF archives to fds

Before now, we've been able to write CTF files to gzFile descriptors or
fds, and CTF archives to named files only.

Make this a bit less irregular by allowing CTF archives to be written
to fds with the new function ctf_arc_write_fd: also allow CTF
files to be written to a new memory buffer via ctf_write_mem.

(It would be nice to complete things by adding a new function to write
CTF archives to memory, but this is too difficult to do given the short
time the linker is expected to be writing them out: we will transition
to a better format in format v4, though we will always support reading
CTF archives that are stored in .ctf sections.)

include/
* ctf-api.h (ctf_arc_write_fd): New.
(ctf_write_mem): Likewise.
(ctf_gzwrite): Spacing fix.

libctf/
* ctf-archive.c (ctf_arc_write): Split off, and reimplement in terms
of...
(ctf_arc_write_fd): ... this new function.
* ctf-create.c (ctf_write_mem): New.
include/ChangeLog
include/ctf-api.h
libctf/ChangeLog
libctf/ctf-archive.c
libctf/ctf-create.c
This page took 0.025334 seconds and 4 git commands to generate.