aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffswap.h
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coffswap.h')
-rw-r--r--bfd/coffswap.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/bfd/coffswap.h b/bfd/coffswap.h
index ae30a5d..c9f25d6 100644
--- a/bfd/coffswap.h
+++ b/bfd/coffswap.h
@@ -1,5 +1,6 @@
/* Generic COFF swapping routines, for BFD.
- Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -422,7 +423,16 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
#if FILNMLEN != E_FILNMLEN
-> Error, we need to cope with truncating or extending FILNMLEN!;
#else
- memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+ if (numaux > 1)
+ {
+ if (indx == 0)
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+ numaux * sizeof (AUXENT));
+ }
+ else
+ {
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+ }
#endif
}
goto end;
@@ -518,8 +528,8 @@ coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PTR inp;
int type;
int class;
- int indx;
- int numaux;
+ int indx ATTRIBUTE_UNUSED;
+ int numaux ATTRIBUTE_UNUSED;
PTR extp;
{
union internal_auxent *in = (union internal_auxent *)inp;