summaryrefslogtreecommitdiffstats
path: root/libasm/asm_newabssym.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2016-07-08 14:08:22 +0200
committerMark Wielaard <[email protected]>2016-08-03 18:19:47 +0200
commitdd906c1b4852be4dd34924017261f89cc5c4c723 (patch)
tree6aac4ef30566095081089eed773711cf00e6e13d /libasm/asm_newabssym.c
parente6ca75ddcf2ba9314077ddc9768eaac2405305e1 (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_newabssym.c')
-rw-r--r--libasm/asm_newabssym.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libasm/asm_newabssym.c b/libasm/asm_newabssym.c
index c5b7beaa..34fef3e3 100644
--- a/libasm/asm_newabssym.c
+++ b/libasm/asm_newabssym.c
@@ -1,5 +1,5 @@
/* Create new ABS symbol.
- Copyright (C) 2002 Red Hat, Inc.
+ Copyright (C) 2002, 2016 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <[email protected]>, 2002.
@@ -80,7 +80,7 @@ asm_newabssym (AsmCtx_t *ctx, const char *name, GElf_Xword size,
result->type = type;
result->binding = binding;
result->symidx = 0;
- result->strent = ebl_strtabadd (ctx->symbol_strtab, name, 0);
+ result->strent = dwelf_strtab_add (ctx->symbol_strtab, name);
/* The value of an ABS symbol must not be modified. Since there are
no subsection and the initial offset of the section is 0 we can