* elfread.c (elf_symtab_read): Do not use udata.p here to find
[deliverable/binutils-gdb.git] / gdb / ppc64-tdep.c
index 9c3616a1a27958e35619f5600f7ddef7da577ca2..f636b4d450bba6261d65f1e0cd14caa0324cf5ac 100644 (file)
@@ -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);
+    }
+}
This page took 0.024065 seconds and 4 git commands to generate.