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/asm_begin.c | |
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/asm_begin.c')
-rw-r--r-- | libasm/asm_begin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libasm/asm_begin.c b/libasm/asm_begin.c index dc83cd8b..6248786c 100644 --- a/libasm/asm_begin.c +++ b/libasm/asm_begin.c @@ -1,5 +1,5 @@ /* Create descriptor for assembling. - Copyright (C) 2002 Red Hat, Inc. + Copyright (C) 2002, 2016 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -115,8 +115,8 @@ prepare_binary_output (AsmCtx_t *result, Ebl *ebl) asm_symbol_tab_init (&result->symbol_tab, 67); result->nsymbol_tab = 0; /* And the string tables. */ - result->section_strtab = ebl_strtabinit (true); - result->symbol_strtab = ebl_strtabinit (true); + result->section_strtab = dwelf_strtab_init (true); + result->symbol_strtab = dwelf_strtab_init (true); /* We have no section groups so far. */ result->groups = NULL; |