diff options
| author | Mark Wielaard <[email protected]> | 2016-07-08 14:08:22 +0200 |
|---|---|---|
| committer | Mark Wielaard <[email protected]> | 2016-08-03 18:19:47 +0200 |
| commit | dd906c1b4852be4dd34924017261f89cc5c4c723 (patch) | |
| tree | 6aac4ef30566095081089eed773711cf00e6e13d /libasm/asm_newscn.c | |
| parent | e6ca75ddcf2ba9314077ddc9768eaac2405305e1 (diff) | |
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 <[email protected]>
Diffstat (limited to 'libasm/asm_newscn.c')
| -rw-r--r-- | libasm/asm_newscn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c index e2367693..ddbb25df 100644 --- a/libasm/asm_newscn.c +++ b/libasm/asm_newscn.c @@ -1,5 +1,5 @@ /* Create new section in output file. - Copyright (C) 2002-2011 Red Hat, Inc. + Copyright (C) 2002-2011, 2016 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2002. @@ -129,8 +129,8 @@ binary_newscn (AsmScn_t *result, GElf_Word type, GElf_Xword flags, result->subnext = NULL; /* Add the name to the section header string table. */ - result->data.main.strent = ebl_strtabadd (result->ctx->section_strtab, - result->name, scnname_len); + result->data.main.strent = dwelf_strtab_add_len (result->ctx->section_strtab, + result->name, scnname_len); assert (result->data.main.strent != NULL); /* Create the new ELF section. */ |
