diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-28 20:21:04 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-28 20:21:04 +0000 |
commit | 0875794a962c041bde76423e980875a467bb0bbe (patch) | |
tree | bab7168364c38c5ad57ad405357258cbb8221348 /gdb/elfread.c | |
parent | d0fb5eaead43c6b5e73b113227b1be71c07fd213 (diff) | |
download | gdb-0875794a962c041bde76423e980875a467bb0bbe.zip gdb-0875794a962c041bde76423e980875a467bb0bbe.tar.gz gdb-0875794a962c041bde76423e980875a467bb0bbe.tar.bz2 |
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/elfread.c')
-rw-r--r-- | gdb/elfread.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gdb/elfread.c b/gdb/elfread.c index dacc6f0..200b82f 100644 --- a/gdb/elfread.c +++ b/gdb/elfread.c @@ -185,7 +185,8 @@ record_minimal_symbol (const char *name, int name_len, int copy_name, { struct gdbarch *gdbarch = get_objfile_arch (objfile); - if (ms_type == mst_text || ms_type == mst_file_text) + if (ms_type == mst_text || ms_type == mst_file_text + || ms_type == mst_text_gnu_ifunc) address = gdbarch_smash_text_address (gdbarch, address); return prim_record_minimal_symbol_full (name, name_len, copy_name, address, @@ -394,7 +395,10 @@ elf_symtab_read (struct objfile *objfile, int type, { if (sym->flags & (BSF_GLOBAL | BSF_WEAK)) { - ms_type = mst_text; + if (sym->flags & BSF_GNU_INDIRECT_FUNCTION) + ms_type = mst_text_gnu_ifunc; + else + ms_type = mst_text; } else if ((sym->name[0] == '.' && sym->name[1] == 'L') || ((sym->flags & BSF_LOCAL) |