aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-03-28 20:26:24 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-03-28 20:26:24 +0000
commit07be84bf8f6a00301ce539a651d1bc717e402b8f (patch)
tree42a487e082944e82b3da5d47b1c97d4cbca54d2d /gdb/symtab.h
parent300f8e104fa748aa73b49f38add5a38d93ce41a2 (diff)
downloadgdb-07be84bf8f6a00301ce539a651d1bc717e402b8f.zip
gdb-07be84bf8f6a00301ce539a651d1bc717e402b8f.tar.gz
gdb-07be84bf8f6a00301ce539a651d1bc717e402b8f.tar.bz2
gdb/
STT_GNU_IFUNC reader implementation. * elfread.c: Include gdbtypes.h, value.h and infcall.h. (SYMBOL_GOT_PLT_SUFFIX, elf_rel_plt_read) (elf_objfile_gnu_ifunc_cache_data, struct elf_gnu_ifunc_cache) (elf_gnu_ifunc_cache_hash, elf_gnu_ifunc_cache_eq) (elf_gnu_ifunc_record_cache, elf_gnu_ifunc_resolve_by_cache) (elf_gnu_ifunc_resolve_by_got, elf_gnu_ifunc_resolve_name) (elf_gnu_ifunc_resolve_addr): New. (elf_symfile_read): Call elf_rel_plt_read. (elf_gnu_ifunc_fns): New. (_initialize_elfread): Initialize elf_objfile_gnu_ifunc_cache_data. Install elf_gnu_ifunc_fns. * infcall.c (find_function_return_type): New function. (find_function_addr): Resolve TYPE_GNU_IFUNC functions, if possible. * minsyms.c (stub_gnu_ifunc_resolve_addr) (stub_gnu_ifunc_resolve_name): New functions. (stub_gnu_ifunc_fns, gnu_ifunc_fns_p): New variables. * symtab.h (struct gnu_ifunc_fns, gnu_ifunc_resolve_addr) (gnu_ifunc_resolve_name, gnu_ifunc_fns_p): New.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 0645515..bc48d3c 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1044,6 +1044,24 @@ extern struct minimal_symbol *lookup_minimal_symbol_by_pc (CORE_ADDR);
extern int in_gnu_ifunc_stub (CORE_ADDR pc);
+/* Functions for resolving STT_GNU_IFUNC symbols which are implemented only
+ for ELF symbol files. */
+
+struct gnu_ifunc_fns
+{
+ /* See elf_gnu_ifunc_resolve_addr for its real implementation. */
+ CORE_ADDR (*gnu_ifunc_resolve_addr) (struct gdbarch *gdbarch, CORE_ADDR pc);
+
+ /* See elf_gnu_ifunc_resolve_name for its real implementation. */
+ int (*gnu_ifunc_resolve_name) (const char *function_name,
+ CORE_ADDR *function_address_p);
+};
+
+#define gnu_ifunc_resolve_addr gnu_ifunc_fns_p->gnu_ifunc_resolve_addr
+#define gnu_ifunc_resolve_name gnu_ifunc_fns_p->gnu_ifunc_resolve_name
+
+extern const struct gnu_ifunc_fns *gnu_ifunc_fns_p;
+
extern struct minimal_symbol *
lookup_minimal_symbol_and_objfile (const char *,
struct objfile **);