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 /libasm/libasmP.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 'libasm/libasmP.h')
-rw-r--r-- | libasm/libasmP.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libasm/libasmP.h b/libasm/libasmP.h index 49b64846..54460cf9 100644 --- a/libasm/libasmP.h +++ b/libasm/libasmP.h @@ -1,5 +1,5 @@ /* Internal definitions for libasm. - Copyright (C) 2002, 2004, 2005 Red Hat, Inc. + Copyright (C) 2002, 2004, 2005, 2016 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -33,6 +33,8 @@ #include <libasm.h> +#include "libdwelf.h" + /* gettext helper macros. */ #define _(Str) dgettext ("elfutils", Str) @@ -85,7 +87,7 @@ struct AsmScn Elf_Scn *scn; /* Entry in the section header string table. */ - struct Ebl_Strent *strent; + Dwelf_Strent *strent; /* Next member of group. */ struct AsmScn *next_in_group; @@ -156,14 +158,14 @@ struct AsmCtx /* List with defined sections. */ AsmScn_t *section_list; /* Section header string table. */ - struct Ebl_Strtab *section_strtab; + Dwelf_Strtab *section_strtab; /* Table with defined symbols. */ asm_symbol_tab symbol_tab; /* Number of symbols in the table. */ unsigned int nsymbol_tab; /* Symbol string table. */ - struct Ebl_Strtab *symbol_strtab; + Dwelf_Strtab *symbol_strtab; /* List of section groups. */ struct AsmScnGrp *groups; @@ -207,7 +209,7 @@ struct AsmSym size_t symidx; /* Reference to name of the symbol. */ - struct Ebl_Strent *strent; + Dwelf_Strent *strent; }; @@ -215,7 +217,7 @@ struct AsmSym struct AsmScnGrp { /* Entry in the section header string table. */ - struct Ebl_Strent *strent; + Dwelf_Strent *strent; /* The ELF section. */ Elf_Scn *scn; |