From dd906c1b4852be4dd34924017261f89cc5c4c723 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 8 Jul 2016 14:08:22 +0200 Subject: 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 --- libasm/asm_begin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libasm/asm_begin.c') 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 , 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; -- cgit v1.2.3