diff --git a/include/ChangeLog b/include/ChangeLog index 1d4eac95ad6..704c9af3ba8 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2020-11-20 Nick Alcock + + * ctf-api.h (ctf_getsymsect): New. + (ctf_getstrsect): Likewise. + 2020-11-20 Nick Alcock * ctf-api.h (ctf_arc_lookup_symbol): New. diff --git a/include/ctf-api.h b/include/ctf-api.h index f0c00c01a89..8687475cc64 100644 --- a/include/ctf-api.h +++ b/include/ctf-api.h @@ -307,6 +307,8 @@ extern ctf_archive_t *ctf_open (const char *filename, const char *target, int *errp); extern void ctf_close (ctf_archive_t *); extern ctf_sect_t ctf_getdatasect (const ctf_dict_t *); +extern ctf_sect_t ctf_getsymsect (const ctf_dict_t *); +extern ctf_sect_t ctf_getstrsect (const ctf_dict_t *); extern ctf_archive_t *ctf_get_arc (const ctf_dict_t *); extern ctf_archive_t *ctf_arc_open (const char *, int *); extern ctf_archive_t *ctf_arc_bufopen (const ctf_sect_t *, diff --git a/libctf/ChangeLog b/libctf/ChangeLog index deca027786d..685c06a0142 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,9 @@ +2020-11-20 Nick Alcock + + * ctf-open.c (ctf_getsymsect): New. + (ctf_getstrsect): Likewise. + * libctf.ver: Add them. + 2020-11-20 Nick Alcock * ctf-impl.h (struct ctf_archive_internal) : New, dicts diff --git a/libctf/ctf-open.c b/libctf/ctf-open.c index 3281c678ac4..ecf27eeeb21 100644 --- a/libctf/ctf-open.c +++ b/libctf/ctf-open.c @@ -1854,6 +1854,18 @@ ctf_getdatasect (const ctf_dict_t *fp) return fp->ctf_data; } +ctf_sect_t +ctf_getsymsect (const ctf_dict_t *fp) +{ + return fp->ctf_symtab; +} + +ctf_sect_t +ctf_getstrsect (const ctf_dict_t *fp) +{ + return fp->ctf_strtab; +} + /* Return the CTF handle for the parent CTF dict, if one exists. Otherwise return NULL to indicate this dict has no imported parent. */ ctf_dict_t * diff --git a/libctf/libctf.ver b/libctf/libctf.ver index f0633f26c4c..cfecc894350 100644 --- a/libctf/libctf.ver +++ b/libctf/libctf.ver @@ -190,4 +190,7 @@ LIBCTF_1.1 { ctf_arc_lookup_symbol; ctf_arc_flush_caches; + + ctf_getsymsect; + ctf_getstrsect; } LIBCTF_1.0;