diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-28 20:21:03 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-28 20:21:03 +0000 |
commit | be30267300397d0fef6ec261d91864f0d837124e (patch) | |
tree | 19c9049057caeccab1767aadd2bcd3e0a749bfe3 /gdb/gdbtypes.h | |
parent | e02d3cc0fc7e6e1ad50b49945c28620568f3f2f8 (diff) | |
download | gdb-be30267300397d0fef6ec261d91864f0d837124e.tar.gz |
gdb/
GDB internal type support for STT_GNU_IFUNC.
* elfread.c (record_minimal_symbol): Support mst_text_gnu_ifunc.
(elf_symtab_read): Set mst_text_gnu_ifunc for
BSF_GNU_INDIRECT_FUNCTION.
* eval.c (evaluate_subexp_standard): Support TYPE_GNU_IFUNC.
* gdbtypes.c (init_type): Support TYPE_FLAG_GNU_IFUNC,
builtin_func_func, nodebug_text_gnu_ifunc_symbol and
nodebug_got_plt_symbol.
* gdbtypes.h (enum type_flag_value): New entry TYPE_FLAG_GNU_IFUNC.
(TYPE_GNU_IFUNC): New.
(struct main_type): New field flag_gnu_ifunc.
(struct builtin_type): New field builtin_func_func.
(struct objfile_type): New fields nodebug_text_gnu_ifunc_symbol and
nodebug_got_plt_symbol.
* minsyms.c (lookup_minimal_symbol_text): Support mst_text_gnu_ifunc.
(in_gnu_ifunc_stub): New.
(prim_record_minimal_symbol, find_solib_trampoline_target): Support
mst_text_gnu_ifunc.
* parse.c (write_exp_msymbol): New variable ifunc_msym. Detect and
support mst_text_gnu_ifunc. Support mst_slot_got_plt.
* solib-svr4.c (svr4_in_dynsym_resolve_code): Return true also for
in_gnu_ifunc_stub.
* symmisc.c (dump_msymbols): Support mst_text_gnu_ifunc.
* symtab.c (search_symbols): Likewise.
* symtab.h (enum minimal_symbol_type): New fields mst_text_gnu_ifunc
and mst_slot_got_plt.
(in_gnu_ifunc_stub): New declaration.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 5f89feccd93..39ca1b465ce 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -170,6 +170,7 @@ enum type_flag_value TYPE_FLAG_VECTOR = (1 << 15), TYPE_FLAG_FIXED_INSTANCE = (1 << 16), TYPE_FLAG_STUB_SUPPORTED = (1 << 17), + TYPE_FLAG_GNU_IFUNC = (1 << 18), /* Used for error-checking. */ TYPE_FLAG_MIN = TYPE_FLAG_UNSIGNED @@ -271,6 +272,12 @@ enum type_instance_flag_value #define TYPE_NOTTEXT(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_NOTTEXT) +/* Used only for TYPE_CODE_FUNC where it specifies the real function + address is returned by this function call. TYPE_TARGET_TYPE determines the + final returned function type to be presented to user. */ + +#define TYPE_GNU_IFUNC(t) (TYPE_MAIN_TYPE (t)->flag_gnu_ifunc) + /* Type owner. If TYPE_OBJFILE_OWNED is true, the type is owned by the objfile retrieved as TYPE_OBJFILE. Otherweise, the type is owned by an architecture; TYPE_OBJFILE is NULL in this case. */ @@ -387,6 +394,7 @@ struct main_type unsigned int flag_varargs : 1; unsigned int flag_vector : 1; unsigned int flag_stub_supported : 1; + unsigned int flag_gnu_ifunc : 1; unsigned int flag_fixed_instance : 1; unsigned int flag_objfile_owned : 1; /* True if this type was declared with "class" rather than @@ -1178,6 +1186,10 @@ struct builtin_type (*) () can server as a generic function pointer. */ struct type *builtin_func_ptr; + /* `function returning pointer to function (returning void)' type. + The final void return type is not significant for it. */ + struct type *builtin_func_func; + /* Special-purpose types. */ @@ -1218,6 +1230,8 @@ struct objfile_type /* Types used for symbols with no debug information. */ struct type *nodebug_text_symbol; + struct type *nodebug_text_gnu_ifunc_symbol; + struct type *nodebug_got_plt_symbol; struct type *nodebug_data_symbol; struct type *nodebug_unknown_symbol; struct type *nodebug_tls_symbol; |