* peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.

(coff_swap_aux_out): Swap out extra PE x_scn fields.
	* coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
	* coffgen.c (coff_print_symbol): If any of the extra PE x_scn
	fields is non-zero, print them.
This commit is contained in:
Ian Lance Taylor 1996-03-27 22:53:16 +00:00
parent 563c235748
commit 8230f31c92
4 changed files with 39 additions and 0 deletions

View file

@ -1,5 +1,11 @@
Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
* peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
(coff_swap_aux_out): Swap out extra PE x_scn fields.
* coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
* coffgen.c (coff_print_symbol): If any of the extra PE x_scn
fields is non-zero, print them.
* coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
ifdef. Remove unused variables.
(ppc_record_data_in_toc_entry): Ifdef out. Removed unused

View file

@ -1272,6 +1272,11 @@ coff_get_lineno (ignore_abfd, symbol)
return coffsymbol (symbol)->lineno;
}
#if 0
/* This is only called from coff_add_missing_symbols, which has been
disabled. */
asymbol *
coff_section_symbol (abfd, name)
bfd *abfd;
@ -1318,6 +1323,8 @@ coff_section_symbol (abfd, name)
return sym;
}
#endif /* 0 */
/* This function transforms the offsets into the symbol table into
pointers to syments. */
@ -1866,6 +1873,13 @@ coff_print_symbol (abfd, filep, symbol, how)
(long) auxp->u.auxent.x_scn.x_scnlen,
auxp->u.auxent.x_scn.x_nreloc,
auxp->u.auxent.x_scn.x_nlinno);
if (auxp->u.auxent.x_scn.x_checksum != 0
|| auxp->u.auxent.x_scn.x_associated != 0
|| auxp->u.auxent.x_scn.x_comdat != 0)
fprintf (file, "checksum 0x%lx assoc %d comdat %d",
auxp->u.auxent.x_scn.x_checksum,
auxp->u.auxent.x_scn.x_associated,
auxp->u.auxent.x_scn.x_comdat);
break;
}
/* else fall through */

View file

@ -397,6 +397,13 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_scn.x_scnlen = GET_SCN_SCNLEN(abfd, ext);
in->x_scn.x_nreloc = GET_SCN_NRELOC(abfd, ext);
in->x_scn.x_nlinno = GET_SCN_NLINNO(abfd, ext);
/* PE defines some extra fields; we zero them out for
safety. */
in->x_scn.x_checksum = 0;
in->x_scn.x_associated = 0;
in->x_scn.x_comdat = 0;
return;
}
break;

View file

@ -535,6 +535,12 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_scn.x_scnlen = GET_SCN_SCNLEN(abfd, ext);
in->x_scn.x_nreloc = GET_SCN_NRELOC(abfd, ext);
in->x_scn.x_nlinno = GET_SCN_NLINNO(abfd, ext);
in->x_scn.x_checksum = bfd_h_get_32 (abfd,
(bfd_byte *) ext->x_scn.x_checksum);
in->x_scn.x_associated =
bfd_h_get_16 (abfd, (bfd_byte *) ext->x_scn.x_associated);
in->x_scn.x_comdat = bfd_h_get_8 (abfd,
(bfd_byte *) ext->x_scn.x_comdat);
return;
}
break;
@ -615,6 +621,12 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PUT_SCN_SCNLEN(abfd, in->x_scn.x_scnlen, ext);
PUT_SCN_NRELOC(abfd, in->x_scn.x_nreloc, ext);
PUT_SCN_NLINNO(abfd, in->x_scn.x_nlinno, ext);
bfd_h_put_32 (abfd, in->x_scn.x_checksum,
(bfd_byte *) ext->x_scn.x_checksum);
bfd_h_put_16 (abfd, in->x_scn.x_associated,
(bfd_byte *) ext->x_scn.x_associated);
bfd_h_put_8 (abfd, in->x_scn.x_comdat,
(bfd_byte *) ext->x_scn.x_comdat);
return sizeof (AUXENT);
}
break;