31 lines
1.0 KiB
Diff
31 lines
1.0 KiB
Diff
Index: gdb/elfread.c
|
|
===================================================================
|
|
RCS file: /cvs/src/src/gdb/elfread.c,v
|
|
retrieving revision 1.57
|
|
diff -u -a -p -u -p -a -r1.57 gdb/elfread.c
|
|
--- gdb/elfread.c 9 Jan 2007 17:58:50 -0000 1.57
|
|
+++ gdb/elfread.c 6 Mar 2007 17:10:24 -0000
|
|
@@ -182,7 +182,10 @@ 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_FUNCTION))
|
|
{
|
|
struct minimal_symbol *msym;
|
|
@@ -309,7 +312,9 @@ elf_symtab_read (struct objfile *objfile
|
|
{
|
|
if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
|
|
{
|
|
- if (sym->section->flags & SEC_LOAD)
|
|
+ if (sym->flags & BSF_FUNCTION)
|
|
+ ms_type = mst_text;
|
|
+ else if (sym->section->flags & SEC_LOAD)
|
|
{
|
|
ms_type = mst_data;
|
|
}
|