diff options
author | Ian Lance Taylor <ian@airs.com> | 1992-10-27 20:34:40 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1992-10-27 20:34:40 +0000 |
commit | 98fd98bcb4a85d91005aa2b762d155da42a2316a (patch) | |
tree | 955f3ae866646250ae36b54aa48e8eeece69ae7e /bfd/coffcode.h | |
parent | 83bfcbaedba78dd881dcb1e96167bfbacadb7dc9 (diff) | |
download | gdb-98fd98bcb4a85d91005aa2b762d155da42a2316a.zip gdb-98fd98bcb4a85d91005aa2b762d155da42a2316a.tar.gz gdb-98fd98bcb4a85d91005aa2b762d155da42a2316a.tar.bz2 |
Moved in from p3:
Tue Oct 27 12:24:34 1992 Ian Lance Taylor (ian@cygnus.com)
* coffcode.h (coff_swap_aux_out): set the fcnary info before
optionally setting the dimen info, since they are in the same
memory locations. Also zero out external auxent.
(coff_write_symbol): don't zero external auxent; now done in
coff_swap_aux_out.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 2277cad..348ba64 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -683,6 +683,8 @@ DEFUN(coff_swap_aux_out,(abfd, inp, type, class, extp), { union internal_auxent *in = (union internal_auxent *)inp; AUXENT *ext = (AUXENT *)extp; + + memset((PTR)ext, 0, AUXESZ); switch (class) { case C_FILE: if (in->x_file.x_fname[0] == 0) { @@ -733,13 +735,13 @@ DEFUN(coff_swap_aux_out,(abfd, inp, type, class, extp), bfd_h_put_16(abfd, in->x_sym.x_tvndx , (bfd_byte *) ext->x_sym.x_tvndx); #endif + PUT_FCN_LNNOPTR(abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); + PUT_FCN_ENDNDX(abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); + if (ISFCN(type)) { PUTWORD(abfd, in->x_sym.x_misc.x_fsize, (bfd_byte *) ext->x_sym.x_misc.x_fsize); - PUT_FCN_LNNOPTR(abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); - PUT_FCN_ENDNDX(abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); } else { - if (ISARY(type) || class == C_BLOCK) { #if DIMNUM != E_DIMNUM -> Error, we need to cope with truncating or extending DIMNUM!; @@ -752,11 +754,6 @@ DEFUN(coff_swap_aux_out,(abfd, inp, type, class, extp), } PUT_LNSZ_LNNO(abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext); PUT_LNSZ_SIZE(abfd, in->x_sym.x_misc.x_lnsz.x_size, ext); - - PUT_FCN_LNNOPTR(abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext); - PUT_FCN_ENDNDX(abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext); - - } } return sizeof(AUXENT); @@ -1594,7 +1591,6 @@ unsigned int written) for (j = 0; j < native->u.syment.n_numaux; j++) { AUXENT buf1; - memset((PTR)&buf, 0, AUXESZ); coff_swap_aux_out(abfd, &( (native + j + 1)->u.auxent), type, class, &buf1); bfd_write((PTR) (&buf1), 1, AUXESZ, abfd); |