Files
gdb/elf-symtab-read.diff

37 lines
1.2 KiB
Diff

Index: gdb/elfread.c
===================================================================
RCS file: /cvs/src/src/gdb/elfread.c,v
retrieving revision 1.61
diff -u -a -p -u -p -a -r1.61 gdb/elfread.c
--- gdb/elfread.c 18 Jun 2007 15:46:38 -0000 1.61
+++ gdb/elfread.c 21 Jun 2007 15:23:57 -0000
@@ -240,7 +240,11 @@ elf_symtab_read (struct objfile *objfile
offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (dynamic
- && sym->section == &bfd_und_section
+ && (sym->section == &bfd_und_section
+ /* On PowerPC64 we also want to add the function descriptor
+ symbols. */
+ || (strcmp (sym->section->name, ".opd") == 0
+ && sym->flags & (BSF_GLOBAL | BSF_WEAK)))
&& (sym->flags & BSF_FUNCTION))
{
struct minimal_symbol *msym;
@@ -365,7 +369,14 @@ elf_symtab_read (struct objfile *objfile
}
else if (sym->section->flags & SEC_ALLOC)
{
- if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
+ if (sym->flags & BSF_FUNCTION)
+ {
+ if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
+ ms_type = mst_solib_trampoline;
+ else
+ continue;
+ }
+ else if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
{
if (sym->section->flags & SEC_LOAD)
{