aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc64-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ppc64-tdep.c')
-rw-r--r--gdb/ppc64-tdep.c15
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);
+ }
+}