summaryrefslogtreecommitdiff
path: root/tests/dwflsyms.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-11-06 20:38:05 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-12-02 21:57:05 +0100
commit47f231a51308e70a24ad087c6d0bc5d934483b50 (patch)
tree50d4fed5dbd360e7f4fae32ee98e25d0ca1da663 /tests/dwflsyms.c
parent8ae9bc9d315be6ecbb97dd9754b9d8424b5a70f0 (diff)
downloadelfutils-47f231a51308e70a24ad087c6d0bc5d934483b50.tar.gz
Provide virtual symbols for ppc64 function descriptorsjankratochvil/ppc64bidir
backends/ 2013-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> Provide virtual symbols for ppc64 function descriptors. * Makefile.am (ppc64_SRCS): Add ppc64_get_symbol.c. * ppc64_get_symbol.c: New file. * ppc64_init.c (ppc64_init): Install init_symbols, get_symbol and destr. libdwfl/ 2013-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> * dwfl_module_addrsym.c (dwfl_module_addrsym): Adjust FIRST_GLOBAL also for EBL_FIRST_GLOBAL. * dwfl_module_getdwarf.c (getsym_helper): New function. (find_symtab): Call also ebl_init_symbols. (dwfl_module_getsymtab): Count also EBL_SYMENTS. * dwfl_module_getsym.c (dwfl_module_getsym_elf): Count also EBL_FIRST_GLOBAL, EBL_SYMENTS. Call also ebl_get_symbol. * libdwflP.h (DWFL_ERRORS): Add INVALID_INDEX. (struct Dwfl_Module): Add fields ebl_syments and ebl_first_global. libebl/ 2013-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> Provide virtual symbols for ppc64 function descriptors. * Makefile.am (gen_SOURCES): Add eblgetsymbol.c. * ebl-hooks.h (init_symbols, get_symbol): New. * eblgetsymbol.c: New file. * libebl.h (ebl_getsym_t): New definition. (ebl_init_symbols, ebl_get_symbol): New declarations. * libeblP.h (struct ebl): New field backend. tests/ 2013-11-30 Jan Kratochvil <jan.kratochvil@redhat.com> Provide virtual symbols for ppc64 function descriptors. * Makefile.am (EXTRA_DIST): Add testfile66.bz2 and testfile66.core.bz2. * dwflsyms.c (list_syms): Remove unused from parameter mod_name. Print error on dwfl_module_getsymtab error. * run-addrname-test.sh (testfile66, testfile66.core): New tests. * run-dwflsyms.sh (testfile66, testfile66.core, hello_ppc64.ko): New tests. * testfile66.bz2: New file. * testfile66.core.bz2: New file. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Diffstat (limited to 'tests/dwflsyms.c')
-rw-r--r--tests/dwflsyms.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c
index 10c01f1f..19f1dbeb 100644
--- a/tests/dwflsyms.c
+++ b/tests/dwflsyms.c
@@ -106,13 +106,16 @@ addr_in_section (Elf *elf, GElf_Word shndx, GElf_Addr addr)
static int
list_syms (struct Dwfl_Module *mod,
- void **user __attribute__ ((unused)),
- const char *mod_name __attribute__ ((unused)),
+ void **user __attribute__ ((unused)), const char *mod_name,
Dwarf_Addr low_addr __attribute__ ((unused)),
void *arg __attribute__ ((unused)))
{
int syms = dwfl_module_getsymtab (mod);
- assert (syms >= 0);
+ if (syms < 0)
+ {
+ printf ("%s: %s\n", mod_name, dwfl_errmsg (-1));
+ return DWARF_CB_OK;
+ }
for (int ndx = 0; ndx < syms; ndx++)
{