aboutsummaryrefslogtreecommitdiff
path: root/backend.h
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar@axis.com>2012-09-27 12:07:35 +0200
committerPetr Machata <pmachata@redhat.com>2012-09-27 14:14:42 +0200
commitb5920d12ceb3dec3d359d8b2972fd22a30c72a66 (patch)
tree0238e3176e19e54c54bc175b1e8480012f3a726a /backend.h
parentad64047d1d724637896d0f93af1a8fcce758c9b5 (diff)
downloadltrace-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.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/backend.h b/backend.h
index bae53bd..e241eab 100644
--- a/backend.h
+++ b/backend.h
@@ -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,