/* Read ELF (Executable and Linking Format) object files for GDB.
- Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support.
continue;
}
+ /* Skip "special" symbols, e.g. ARM mapping symbols. These are
+ symbols which do not correspond to objects in the symbol table,
+ but have some other target-specific meaning. */
+ if (bfd_is_target_special_symbol (objfile->obfd, sym))
+ continue;
+
offset = ANOFFSET (objfile->section_offsets, sym->section->index);
if (dynamic
&& sym->section == &bfd_und_section
}
else if (sym->section->flags & SEC_CODE)
{
- if (sym->flags & BSF_GLOBAL)
+ if (sym->flags & (BSF_GLOBAL | BSF_WEAK))
{
ms_type = mst_text;
}
make_cleanup (xfree, synthsyms);
synth_symbol_table = xmalloc (sizeof (asymbol *) * synthcount);
for (i = 0; i < synthcount; i++)
- {
- synth_symbol_table[i] = synthsyms + i;
- /* Synthetic symbols are not, strictly speaking, either local
- or global. But we can treat them as global symbols, since
- they are effectively dynamic symbols. */
- synth_symbol_table[i]->flags |= BSF_GLOBAL;
- }
+ synth_symbol_table[i] = synthsyms + i;
make_cleanup (xfree, synth_symbol_table);
elf_symtab_read (objfile, 0, synthcount, synth_symbol_table);
}