* mdebugread.c (parse_partial_symbols): Go ahead and read the .mdebug

section, but just don't add a 2nd minimal symbol if this is an .mdebug
        section in an ELF file.
This commit is contained in:
Dawn Perchik 1998-07-02 17:30:20 +00:00
parent 5cc30c0a87
commit 3acd0db516
2 changed files with 101 additions and 97 deletions

View File

@ -1,3 +1,9 @@
Thu Jul 2 10:22:00 1998 Dawn Perchik <dawn@cygnus.com>
* mdebugread.c (parse_partial_symbols): Go ahead and read the .mdebug
section, but just don't add a 2nd minimal symbol if this is an .mdebug
section in an ELF file.
1998-07-01 Jim Blandy <jimb@zwingli.cygnus.com> 1998-07-01 Jim Blandy <jimb@zwingli.cygnus.com>
* Makefile.in (ax-general.o): Depend on $(defs_h) too. * Makefile.in (ax-general.o): Depend on $(defs_h) too.

View File

@ -2431,111 +2431,109 @@ parse_partial_symbols (objfile, section_offsets)
Skip the creation of the minimal symbols based on the ECOFF Skip the creation of the minimal symbols based on the ECOFF
symbol table. */ symbol table. */
if (ECOFF_IN_ELF(cur_bfd)) /* Pass 2 over external syms: fill in external symbols */
{ ext_in = ext_block;
/* Pass 2 over external syms: fill in external symbols */ ext_in_end = ext_in + hdr->iextMax;
ext_in = ext_block; for (; ext_in < ext_in_end; ext_in++)
ext_in_end = ext_in + hdr->iextMax; {
for (; ext_in < ext_in_end; ext_in++) enum minimal_symbol_type ms_type = mst_text;
{ CORE_ADDR svalue = ext_in->asym.value;
enum minimal_symbol_type ms_type = mst_text;
CORE_ADDR svalue = ext_in->asym.value;
/* The Irix 5 native tools seem to sometimes generate bogus /* The Irix 5 native tools seem to sometimes generate bogus
external symbols. */ external symbols. */
if (ext_in->ifd < -1 || ext_in->ifd >= hdr->ifdMax) if (ext_in->ifd < -1 || ext_in->ifd >= hdr->ifdMax)
{ {
complain (&bad_ext_ifd_complaint, ext_in->ifd, hdr->ifdMax); complain (&bad_ext_ifd_complaint, ext_in->ifd, hdr->ifdMax);
continue;
}
if (ext_in->asym.iss < 0 || ext_in->asym.iss >= hdr->issExtMax)
{
complain (&bad_ext_iss_complaint, ext_in->asym.iss,
hdr->issExtMax);
continue;
}
extern_tab[fdr_to_pst[ext_in->ifd].globals_offset
+ fdr_to_pst[ext_in->ifd].n_globals++] = *ext_in;
if (SC_IS_UNDEF(ext_in->asym.sc) || ext_in->asym.sc == scNil)
continue; continue;
}
if (ext_in->asym.iss < 0 || ext_in->asym.iss >= hdr->issExtMax)
{
complain (&bad_ext_iss_complaint, ext_in->asym.iss,
hdr->issExtMax);
continue;
}
extern_tab[fdr_to_pst[ext_in->ifd].globals_offset
/* Pass 3 over files, over local syms: fill in static symbols */ + fdr_to_pst[ext_in->ifd].n_globals++] = *ext_in;
name = debug_info->ssext + ext_in->asym.iss;
/* Process ECOFF Symbol Types and Storage Classes */
switch (ext_in->asym.st) if (SC_IS_UNDEF(ext_in->asym.sc) || ext_in->asym.sc == scNil)
{ continue;
case stProc:
/* Beginnning of Procedure */
svalue += ANOFFSET (section_offsets, SECT_OFF_TEXT); /* Pass 3 over files, over local syms: fill in static symbols */
break; name = debug_info->ssext + ext_in->asym.iss;
case stStaticProc:
/* Load time only static procs */ /* Process ECOFF Symbol Types and Storage Classes */
ms_type = mst_file_text; switch (ext_in->asym.st)
svalue += ANOFFSET (section_offsets, SECT_OFF_TEXT); {
break; case stProc:
case stGlobal: /* Beginnning of Procedure */
/* External symbol */ svalue += ANOFFSET (section_offsets, SECT_OFF_TEXT);
if (SC_IS_COMMON (ext_in->asym.sc)) break;
{ case stStaticProc:
/* The value of a common symbol is its size, not its address. /* Load time only static procs */
Ignore it. */ ms_type = mst_file_text;
continue; svalue += ANOFFSET (section_offsets, SECT_OFF_TEXT);
} break;
else if (SC_IS_DATA (ext_in->asym.sc)) case stGlobal:
{ /* External symbol */
ms_type = mst_data; if (SC_IS_COMMON (ext_in->asym.sc))
svalue += ANOFFSET (section_offsets, SECT_OFF_DATA); {
} /* The value of a common symbol is its size, not its address.
else if (SC_IS_BSS (ext_in->asym.sc)) Ignore it. */
{ continue;
ms_type = mst_bss; }
svalue += ANOFFSET (section_offsets, SECT_OFF_BSS); else if (SC_IS_DATA (ext_in->asym.sc))
} {
else ms_type = mst_data;
ms_type = mst_abs; svalue += ANOFFSET (section_offsets, SECT_OFF_DATA);
break; }
case stLabel: else if (SC_IS_BSS (ext_in->asym.sc))
/* Label */ {
if (SC_IS_TEXT (ext_in->asym.sc)) ms_type = mst_bss;
{ svalue += ANOFFSET (section_offsets, SECT_OFF_BSS);
ms_type = mst_file_text; }
svalue += ANOFFSET (section_offsets, SECT_OFF_TEXT); else
} ms_type = mst_abs;
else if (SC_IS_DATA (ext_in->asym.sc)) break;
{ case stLabel:
ms_type = mst_file_data; /* Label */
svalue += ANOFFSET (section_offsets, SECT_OFF_DATA); if (SC_IS_TEXT (ext_in->asym.sc))
} {
else if (SC_IS_BSS (ext_in->asym.sc)) ms_type = mst_file_text;
{ svalue += ANOFFSET (section_offsets, SECT_OFF_TEXT);
ms_type = mst_file_bss; }
svalue += ANOFFSET (section_offsets, SECT_OFF_BSS); else if (SC_IS_DATA (ext_in->asym.sc))
} {
else ms_type = mst_file_data;
ms_type = mst_abs; svalue += ANOFFSET (section_offsets, SECT_OFF_DATA);
break; }
case stLocal: else if (SC_IS_BSS (ext_in->asym.sc))
case stNil: {
/* The alpha has the section start addresses in stLocal symbols ms_type = mst_file_bss;
svalue += ANOFFSET (section_offsets, SECT_OFF_BSS);
}
else
ms_type = mst_abs;
break;
case stLocal:
case stNil:
/* The alpha has the section start addresses in stLocal symbols
whose name starts with a `.'. Skip those but complain for all whose name starts with a `.'. Skip those but complain for all
other stLocal symbols. other stLocal symbols.
Irix6 puts the section start addresses in stNil symbols, skip Irix6 puts the section start addresses in stNil symbols, skip
those too. */ those too.*/
if (name[0] == '.') if (name[0] == '.')
continue; continue;
/* Fall through. */ /* Fall through. */
default: default:
ms_type = mst_unknown; ms_type = mst_unknown;
complain (&unknown_ext_complaint, name); complain (&unknown_ext_complaint, name);
} }
if (!ECOFF_IN_ELF(cur_bfd))
prim_record_minimal_symbol (name, svalue, ms_type, objfile); prim_record_minimal_symbol (name, svalue, ms_type, objfile);
} }
}
/* Pass 3 over files, over local syms: fill in static symbols */ /* Pass 3 over files, over local syms: fill in static symbols */
for (f_idx = 0; f_idx < hdr->ifdMax; f_idx++) for (f_idx = 0; f_idx < hdr->ifdMax; f_idx++)