diff options
author | Alan Modra <amodra@gmail.com> | 2013-02-22 23:24:24 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-02-22 23:24:24 +0000 |
commit | 24c274a1338fdc8295f85a2a4854cfa80a1712da (patch) | |
tree | 2bbaead54100b14c77a006507f57cb4390b06221 /gdb/ppc64-tdep.c | |
parent | d38b600c90d85858c10a397e905219646f22ab5b (diff) | |
download | gdb-24c274a1338fdc8295f85a2a4854cfa80a1712da.zip gdb-24c274a1338fdc8295f85a2a4854cfa80a1712da.tar.gz gdb-24c274a1338fdc8295f85a2a4854cfa80a1712da.tar.bz2 |
* elfread.c (elf_symtab_read): Do not use udata.p here to find
symbol size.
* ppc64-tdep.c (ppc64_elf_make_msymbol_special): New function.
* ppc64-tdep.h (ppc64_elf_make_msymbol_special): Declare.
* ppc-linux-tdep.c (ppc_linux_init_abi): Set up to use the above.
* ppcfbsd-tdep.c (ppcfbsd_init_abi): Likewise.
Diffstat (limited to 'gdb/ppc64-tdep.c')
-rw-r--r-- | gdb/ppc64-tdep.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ppc64-tdep.c b/gdb/ppc64-tdep.c index 9c3616a..f636b4d 100644 --- a/gdb/ppc64-tdep.c +++ b/gdb/ppc64-tdep.c @@ -22,6 +22,7 @@ #include "gdbcore.h" #include "ppc-tdep.h" #include "ppc64-tdep.h" +#include "elf-bfd.h" /* Macros for matching instructions. Note that, since all the operands are masked off before they're or-ed into the instruction, @@ -361,3 +362,17 @@ ppc64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, return addr; } + +/* A synthetic 'dot' symbols on ppc64 has the udata.p entry pointing + back to the original ELF symbol it was derived from. Get the size + from that symbol. */ + +void +ppc64_elf_make_msymbol_special (asymbol *sym, struct minimal_symbol *msym) +{ + if ((sym->flags & BSF_SYNTHETIC) != 0 && sym->udata.p != NULL) + { + elf_symbol_type *elf_sym = (elf_symbol_type *) sym->udata.p; + SET_MSYMBOL_SIZE (msym, elf_sym->internal_elf_sym.st_size); + } +} |