diff options
author | Mark Wielaard <mjw@redhat.com> | 2016-07-08 14:08:22 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2016-08-03 18:19:47 +0200 |
commit | dd906c1b4852be4dd34924017261f89cc5c4c723 (patch) | |
tree | 6aac4ef30566095081089eed773711cf00e6e13d /libebl/libebl.h | |
parent | e6ca75ddcf2ba9314077ddc9768eaac2405305e1 (diff) | |
download | elfutils-dd906c1b4852be4dd34924017261f89cc5c4c723.tar.gz |
dwelf: Add string table functions from ebl.
Move the strtab functions from libebl to libdw. Programs often want to
create ELF/DWARF string tables. We don't want (static) linking against
ebl since those are internal functions that might change.
This introduces dwelf_strtab_init, dwelf_strtab_add,
dwelf_strtab_add_len, dwelf_strtab_finalize, dwelf_strent_off,
dwelf_strent_str and dwelf_strtab_free. Documentation for each has
been added to libdwelf.h. The add fucntion got a variant that takes
the length explicitly and finalize was changed to return NULL on
out of memory instead of aborting. All code and tests now uses the
new functions.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libebl/libebl.h')
-rw-r--r-- | libebl/libebl.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/libebl/libebl.h b/libebl/libebl.h index cef71574..c8e01fe9 100644 --- a/libebl/libebl.h +++ b/libebl/libebl.h @@ -287,31 +287,6 @@ extern int ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, extern int ebl_abi_cfi (Ebl *ebl, Dwarf_CIE *abi_info) __nonnull_attribute__ (2); -/* ELF string table handling. */ -struct Ebl_Strtab; -struct Ebl_Strent; - -/* Create new ELF string table object in memory. */ -extern struct Ebl_Strtab *ebl_strtabinit (bool nullstr); - -/* Free resources allocated for ELF string table ST. */ -extern void ebl_strtabfree (struct Ebl_Strtab *st); - -/* Add string STR (length LEN is != 0) to ELF string table ST. */ -extern struct Ebl_Strent *ebl_strtabadd (struct Ebl_Strtab *st, - const char *str, size_t len); - -/* Finalize string table ST and store size and memory location information - in DATA. */ -extern void ebl_strtabfinalize (struct Ebl_Strtab *st, Elf_Data *data); - -/* Get offset in string table for string associated with SE. */ -extern size_t ebl_strtaboffset (struct Ebl_Strent *se); - -/* Return the string associated with SE. */ -extern const char *ebl_string (struct Ebl_Strent *se); - - /* Register map info. */ typedef struct { |