Revert commit 240d6706c6a2
[binutils-gdb.git] / bfd / coffswap.h
index e0dbd04f399611997198bfde66c79d3b2a95f10d..dc3343afed4a93896bcd6eccd2eafd75580096ab 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic COFF swapping routines, for BFD.
-   Copyright (C) 1990-2021 Free Software Foundation, Inc.
+   Copyright (C) 1990-2022 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -418,8 +418,8 @@ coff_swap_aux_in (bfd *abfd,
     case C_FILE:
       if (ext->x_file.x_fname[0] == 0)
        {
-         in->x_file.x_n.x_zeroes = 0;
-         in->x_file.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
+         in->x_file.x_n.x_n.x_zeroes = 0;
+         in->x_file.x_n.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
        }
       else
        {
@@ -429,11 +429,11 @@ coff_swap_aux_in (bfd *abfd,
          if (numaux > 1 && coff_data (abfd)->pe)
            {
              if (indx == 0)
-               memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+               memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname,
                        numaux * sizeof (AUXENT));
            }
          else
-           memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+           memcpy (in->x_file.x_n.x_fname, ext->x_file.x_fname, FILNMLEN);
 #endif
        }
       goto end;
@@ -522,17 +522,17 @@ coff_swap_aux_out (bfd * abfd,
   switch (in_class)
     {
     case C_FILE:
-      if (in->x_file.x_fname[0] == 0)
+      if (in->x_file.x_n.x_fname[0] == 0)
        {
          H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
-         H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset);
+         H_PUT_32 (abfd, in->x_file.x_n.x_n.x_offset, ext->x_file.x_n.x_offset);
        }
       else
        {
 #if FILNMLEN != E_FILNMLEN
 #error we need to cope with truncating or extending FILNMLEN
 #else
-         memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+         memcpy (ext->x_file.x_fname, in->x_file.x_n.x_fname, FILNMLEN);
 #endif
        }
       goto end;