diff options
author | Edgar E. Iglesias <edgar@axis.com> | 2012-09-27 12:07:35 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-09-27 14:14:42 +0200 |
commit | b5920d12ceb3dec3d359d8b2972fd22a30c72a66 (patch) | |
tree | 0238e3176e19e54c54bc175b1e8480012f3a726a /backend.h | |
parent | ad64047d1d724637896d0f93af1a8fcce758c9b5 (diff) | |
download | ltrace-b5920d12ceb3dec3d359d8b2972fd22a30c72a66.tar.gz |
Break out the symbol info gathering into a backend call
No functional change. Will be used by the MIPS backend.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
Diffstat (limited to 'backend.h')
-rw-r--r-- | backend.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -266,6 +266,21 @@ void arch_process_destroy(struct Process *proc); int arch_process_clone(struct Process *retp, struct Process *proc); int arch_process_exec(struct Process *proc); +/* The following callback has to be implemented in backend if arch.h + * defines ARCH_HAVE_GET_SYM_INFO. + * + * This is called for every PLT relocation R in ELF file LTE, that + * ltrace is about to add to it's internal representation of the + * program under trace. + * The corresponding PLT entry is for SYM_INDEX-th relocation in the file. + * + * The callback is responsible for initializing RELA and SYM. + * + * Return 0 if OK. + * Return a negative value if this symbol (SYM_INDEX) should be ignored. */ +int arch_get_sym_info(struct ltelf *lte, const char *filename, + size_t sym_index, GElf_Rela *rela, GElf_Sym *sym); + enum plt_status { plt_fail, plt_ok, |