libctf, open: new API for getting the size of CTF/BTF file sections

I wrote this for BTF type size querying programs, but it might be
of more general use and it's impossible to get this info in any
other way, so we might want to keep it.

New API:
+size_t ctf_sect_size (ctf_dict_t *, ctf_sect_names_t sect);
This commit is contained in:
Nick Alcock
2025-04-25 11:51:04 +01:00
parent 4837852527
commit f7f72bcca6
3 changed files with 49 additions and 0 deletions

View File

@@ -167,6 +167,7 @@ LIBCTF_2.0 {
ctf_write_mem;
ctf_gzwrite;
ctf_compress_write;
ctf_sect_size;
ctf_getdatasect;
ctf_getsymsect;
ctf_getstrsect;