* coffcode.h (get_normalized_symtab): fixed bug where symbols
with more than one auxent can cause nasty core dumps.
This commit is contained in:
parent
d35bf52d93
commit
a0f3f080c1
2 changed files with 43 additions and 25 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
Thu Feb 13 17:22:44 1992 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||||
|
|
||||||
|
* coffcode.h (get_normalized_symtab): fixed bug where symbols
|
||||||
|
with more than one auxent can cause nasty core dumps.
|
||||||
|
|
||||||
|
* coffcode.h, libcoff.c: added new fielded to coff_symbol_struct
|
||||||
|
"done_lineno" so that a symbol which appears twice in the symbol
|
||||||
|
table only gets it's linenumbers relocated once. Modifed
|
||||||
|
(coff_write_native_symbol) and (coff_make_empty_symbol) to make
|
||||||
|
use of it.
|
||||||
|
|
||||||
Tue Feb 4 15:39:55 1992 Steve Chamberlain (sac at rtl.cygnus.com)
|
Tue Feb 4 15:39:55 1992 Steve Chamberlain (sac at rtl.cygnus.com)
|
||||||
|
|
||||||
* aoutx.h: (translate_from_native_sym_flags): fix constructor
|
* aoutx.h: (translate_from_native_sym_flags): fix constructor
|
||||||
|
|
|
@ -607,6 +607,7 @@ DEFUN(coff_swap_aux_in,(abfd, ext1, type, class, in1),
|
||||||
in->x_scn.x_nlinno = GET_SCN_NLINNO(abfd, ext);
|
in->x_scn.x_nlinno = GET_SCN_NLINNO(abfd, ext);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
in->x_sym.x_tagndx.l = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_tagndx);
|
in->x_sym.x_tagndx.l = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_tagndx);
|
||||||
#ifndef NO_TVNDX
|
#ifndef NO_TVNDX
|
||||||
|
@ -2310,10 +2311,12 @@ DEFUN(coff_write_object_contents,(abfd),
|
||||||
same but is not a reasonable time. -- gnu@cygnus.com
|
same but is not a reasonable time. -- gnu@cygnus.com
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
Well, I like it, so I'm conditionally compiling it in.
|
Well, I like it, and now we have *customers* who have requested it,
|
||||||
steve@cygnus.com
|
so I'm conditionally compiling it in.
|
||||||
|
|
||||||
|
sac@cygnus.com
|
||||||
*/
|
*/
|
||||||
#ifdef COFF_TIMESTAMP
|
#ifndef NOCOFF_TIMESTAMP
|
||||||
internal_f.f_timdat = time(0);
|
internal_f.f_timdat = time(0);
|
||||||
#else
|
#else
|
||||||
internal_f.f_timdat = 0;
|
internal_f.f_timdat = 0;
|
||||||
|
@ -2339,12 +2342,12 @@ DEFUN(coff_write_object_contents,(abfd),
|
||||||
internal_f.f_flags |= F_LSYMS;
|
internal_f.f_flags |= F_LSYMS;
|
||||||
if (abfd->flags & EXEC_P)
|
if (abfd->flags & EXEC_P)
|
||||||
internal_f.f_flags |= F_EXEC;
|
internal_f.f_flags |= F_EXEC;
|
||||||
#if M88
|
|
||||||
internal_f.f_flags |= F_AR32W;
|
|
||||||
#else
|
|
||||||
if (!abfd->xvec->byteorder_big_p)
|
if (!abfd->xvec->byteorder_big_p)
|
||||||
internal_f.f_flags |= F_AR32WR;
|
internal_f.f_flags |= F_AR32WR;
|
||||||
#endif
|
else
|
||||||
|
internal_f.f_flags |= F_AR32W;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FIXME, should do something about the other byte orders and
|
FIXME, should do something about the other byte orders and
|
||||||
architectures.
|
architectures.
|
||||||
|
@ -2659,6 +2662,7 @@ bfd *abfd)
|
||||||
{
|
{
|
||||||
combined_entry_type *internal;
|
combined_entry_type *internal;
|
||||||
combined_entry_type *internal_ptr;
|
combined_entry_type *internal_ptr;
|
||||||
|
combined_entry_type *symbol_ptr;
|
||||||
combined_entry_type *internal_end;
|
combined_entry_type *internal_end;
|
||||||
SYMENT *raw;
|
SYMENT *raw;
|
||||||
SYMENT *raw_src;
|
SYMENT *raw_src;
|
||||||
|
@ -2703,24 +2707,28 @@ bfd *abfd)
|
||||||
coff_swap_sym_in(abfd, (char *)raw_src, (char *)&internal_ptr->u.syment);
|
coff_swap_sym_in(abfd, (char *)raw_src, (char *)&internal_ptr->u.syment);
|
||||||
internal_ptr->fix_tag = 0;
|
internal_ptr->fix_tag = 0;
|
||||||
internal_ptr->fix_end = 0;
|
internal_ptr->fix_end = 0;
|
||||||
|
symbol_ptr = internal_ptr;
|
||||||
|
|
||||||
for (i = internal_ptr->u.syment.n_numaux;
|
for (i = 0;
|
||||||
i;
|
i < symbol_ptr->u.syment.n_numaux;
|
||||||
--i, raw_src++, internal_ptr++) {
|
i++)
|
||||||
|
{
|
||||||
|
internal_ptr++;
|
||||||
|
raw_src++;
|
||||||
|
|
||||||
(internal_ptr+1)->fix_tag = 0;
|
internal_ptr->fix_tag = 0;
|
||||||
(internal_ptr+1)->fix_end = 0;
|
internal_ptr->fix_end = 0;
|
||||||
|
|
||||||
coff_swap_aux_in(abfd, (char *)(raw_src +1),
|
coff_swap_aux_in(abfd, (char *)(raw_src),
|
||||||
internal_ptr->u.syment.n_type,
|
symbol_ptr->u.syment.n_type,
|
||||||
internal_ptr->u.syment.n_sclass,
|
symbol_ptr->u.syment.n_sclass,
|
||||||
&(internal_ptr+1)->u.auxent);
|
internal_ptr->u.auxent);
|
||||||
|
|
||||||
coff_pointerize_aux(abfd,
|
coff_pointerize_aux(abfd,
|
||||||
internal,
|
internal,
|
||||||
internal_ptr->u.syment.n_type,
|
symbol_ptr->u.syment.n_type,
|
||||||
internal_ptr->u.syment.n_sclass,
|
symbol_ptr->u.syment.n_sclass,
|
||||||
internal_ptr +1);
|
internal_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3638,11 +3646,10 @@ DEFUN(jmp1,(input_section, symbols, r, shrink),
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean
|
static boolean
|
||||||
DEFUN(bfd_coff_relax_section,(abfd, i, symbols, seclet),
|
DEFUN(bfd_coff_relax_section,(abfd, i, symbols),
|
||||||
bfd *abfd AND
|
bfd *abfd AND
|
||||||
asection *i AND
|
asection *i AND
|
||||||
asymbol **symbols AND
|
asymbol **symbols)
|
||||||
bfd_seclet_type *seclet)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Get enough memory to hold the stuff */
|
/* Get enough memory to hold the stuff */
|
||||||
|
|
Loading…
Reference in a new issue