include/coff
authorTristan Gingold <gingold@adacore.com>
Wed, 4 May 2011 11:05:14 +0000 (11:05 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 4 May 2011 11:05:14 +0000 (11:05 +0000)
2011-05-04  Tristan Gingold  <gingold@adacore.com>

* rs6000.h (union external_auxent): Add x_ftype field.
* rs6k64.h: (struct external_auxent): Remap x_file field.

bfd/
2011-04-28  Tristan Gingold  <gingold@adacore.com>

* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
(bfd_xcoff_swap_aux_out): Ditto.
* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
(bfd_xcoff64_swap_aux_out): Ditto.

bfd/ChangeLog
bfd/coff-rs6000.c
bfd/coff64-rs6000.c
include/coff/ChangeLog
include/coff/rs6000.h
include/coff/rs6k64.h

index 9437475c6070826b2341fcd03c6f82124bc90d44..7af29f07a9fe475c8ec3aa64942eddaa6f789bfd 100644 (file)
@@ -1,3 +1,10 @@
+2011-04-28  Tristan Gingold  <gingold@adacore.com>
+
+       * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
+       (bfd_xcoff_swap_aux_out): Ditto.
+       * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
+       (bfd_xcoff64_swap_aux_out): Ditto.
+
 2011-05-04  Alan Modra  <amodra@gmail.com>
 
        PR ld/12727
index 41bec09276b2daa814f42a2dfeef1eecfcea6fca..21da658d2da6d910d8893f78d72d3c06cae954ec 100644 (file)
@@ -463,23 +463,23 @@ _bfd_xcoff_swap_aux_in (bfd *abfd, PTR ext1, int type, int in_class,
   switch (in_class)
     {
     case C_FILE:
-      if (ext->x_file.x_fname[0] == 0)
+      if (ext->x_file.x_n.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);
+           H_GET_32 (abfd, ext->x_file.x_n.x_n.x_offset);
        }
       else
        {
          if (numaux > 1)
            {
              if (indx == 0)
-               memcpy (in->x_file.x_fname, ext->x_file.x_fname,
+               memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname,
                        numaux * sizeof (AUXENT));
            }
          else
            {
-             memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+             memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN);
            }
        }
       goto end;
@@ -578,12 +578,13 @@ _bfd_xcoff_swap_aux_out (bfd *abfd, PTR inp, int type, int in_class,
     case C_FILE:
       if (in->x_file.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, 0, ext->x_file.x_n.x_n.x_zeroes);
+         H_PUT_32 (abfd, in->x_file.x_n.x_offset,
+                    ext->x_file.x_n.x_n.x_offset);
        }
       else
        {
-         memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+         memcpy (ext->x_file.x_n.x_fname, in->x_file.x_fname, FILNMLEN);
        }
       goto end;
 
index cb2f1cc6f3d20eb9ecd2fd5ab99ce4922f10bb21..1887bb97f280229983647b44b09af3364040454d 100644 (file)
@@ -353,14 +353,15 @@ _bfd_xcoff64_swap_aux_in (bfd *abfd, void *ext1, int type, int in_class,
   switch (in_class)
     {
     case C_FILE:
-      if (ext->x_file.x_n.x_zeroes[0] == 0)
+      if (ext->x_file.x_n.x_n.x_zeroes[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_offset =
+            H_GET_32 (abfd, ext->x_file.x_n.x_n.x_offset);
        }
       else
        {
-         memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
+         memcpy (in->x_file.x_fname, ext->x_file.x_n.x_fname, FILNMLEN);
        }
       goto end;
 
@@ -444,12 +445,13 @@ _bfd_xcoff64_swap_aux_out (bfd *abfd, void *inp, int type, int in_class,
     case C_FILE:
       if (in->x_file.x_n.x_zeroes == 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, 0, ext->x_file.x_n.x_n.x_zeroes);
+         H_PUT_32 (abfd, in->x_file.x_n.x_offset,
+                    ext->x_file.x_n.x_n.x_offset);
        }
       else
        {
-         memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+         memcpy (ext->x_file.x_n.x_fname, in->x_file.x_fname, FILNMLEN);
        }
       H_PUT_8 (abfd, _AUX_FILE, ext->x_auxtype.x_auxtype);
       goto end;
index 744d7e2bf1ac76deac1b67fc1da2cc62d7e1e13f..b2fe5af8a928774fd2276080295e46c90d629b52 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-04  Tristan Gingold  <gingold@adacore.com>
+
+       * rs6000.h (union external_auxent): Add x_ftype field.
+       * rs6k64.h: (struct external_auxent): Remap x_file field.
+
 2011-05-04  Tristan Gingold  <gingold@adacore.com>
 
        * rs6000.h (struct external_exceptab): New struct.
index c72e6e95321a483c0e48bd16613d377a97b24bc3..d5b2af24acaad154853c1635144c961838a34a6c 100644 (file)
@@ -168,13 +168,16 @@ union external_auxent {
                char x_tvndx[2];                /* tv index */
        } x_sym;
 
-       union {
-               char x_fname[E_FILNMLEN];
-               struct {
-                       char x_zeroes[4];
-                       char x_offset[4];
-               } x_n;
-       } x_file;
+        struct {
+                union {
+                        char x_fname[E_FILNMLEN];
+                        struct {
+                                char x_zeroes[4];
+                                char x_offset[4];
+                        } x_n;
+                } x_n;
+                char x_ftype[1];
+        } x_file;
 
        struct {
                char x_scnlen[4];                       /* section length */
index ef91db43891c3319e1351474a25a553f612f7879..453198a563e1042094e1a580778c433ae1e9764a 100644 (file)
@@ -152,15 +152,17 @@ union external_auxent
        } x_fcnary;
     } x_sym;
          
-    union {
-       char x_fname[E_FILNMLEN];
-       struct {
-           char x_zeroes[4];
-           char x_offset[4];
-           char          x_pad[6];
-           unsigned char x_ftype[1];
-           unsigned char x_resv[2];
-       } x_n;
+    struct {
+        union {
+            char x_fname[E_FILNMLEN];
+            struct {
+               char x_zeroes[4];
+                char x_offset[4];
+               char x_pad[6];
+            } x_n;
+        } x_n;
+        unsigned char x_ftype[1];
+        unsigned char x_resv[2];
     } x_file;
 
     struct {