diff options
author | Jan Kratochvil <[email protected]> | 2013-11-06 20:38:05 +0100 |
---|---|---|
committer | Jan Kratochvil <[email protected]> | 2013-12-02 21:57:05 +0100 |
commit | 47f231a51308e70a24ad087c6d0bc5d934483b50 (patch) | |
tree | 50d4fed5dbd360e7f4fae32ee98e25d0ca1da663 /libdwfl/dwfl_module_addrsym.c | |
parent | 8ae9bc9d315be6ecbb97dd9754b9d8424b5a70f0 (diff) |
Provide virtual symbols for ppc64 function descriptorsupstream/jankratochvil/ppc64bidir
backends/
2013-11-30 Jan Kratochvil <[email protected]>
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 <[email protected]>
* 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Diffstat (limited to 'libdwfl/dwfl_module_addrsym.c')
-rw-r--r-- | libdwfl/dwfl_module_addrsym.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c index 320d41f1..b11ba756 100644 --- a/libdwfl/dwfl_module_addrsym.c +++ b/libdwfl/dwfl_module_addrsym.c @@ -179,16 +179,17 @@ dwfl_module_addrsym_elf (Dwfl_Module *mod, GElf_Addr addr, } } - /* First go through global symbols. mod->first_global and - mod->aux_first_global are setup by dwfl_module_getsymtab to the - index of the first global symbol in those symbol tables. Both - are non-zero when the table exist, except when there is only a - dynsym table loaded through phdrs, then first_global is zero and - there will be no auxiliary table. All symbols with local binding - come first in the symbol table, then all globals. The zeroth, - null entry, in the auxiliary table is skipped if there is a main - table. */ - int first_global = mod->first_global + mod->aux_first_global; + /* First go through global symbols. mod->first_global, + mod->aux_first_global and mod->ebl_first_global are setup by + dwfl_module_getsymtab to the index of the first global symbol in + those symbol tables. Both are non-zero when the table exist, + except when there is only a dynsym table loaded through phdrs, then + first_global is zero and there will be no auxiliary table. All + symbols with local binding come first in the symbol table, then all + globals. The zeroth, null entry, in the auxiliary table is skipped + if there is a main table. */ + int first_global = (mod->first_global + mod->aux_first_global + + mod->ebl_first_global); if (mod->syments > 0 && mod->aux_syments > 0) first_global--; search_table (first_global == 0 ? 1 : first_global, syments); |