]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Swapped the order of the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM
authorNick Clifton <nickc@redhat.com>
Tue, 23 Jul 2002 10:26:05 +0000 (10:26 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 23 Jul 2002 10:26:05 +0000 (10:26 +0000)
loaders to show the Copyright string.

bfd/ChangeLog
bfd/nlmcode.h

index 6449e323315d2a1de8b327f76abc8f18bac93969..f4652bf1858c26208fcb25721442be6761663358 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
+
+       * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
+       the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
+       show the Copyright string.
+
 2002-07-23  Nick Clifton  <nickc@redhat.com>
 
        * po/fr.po: New French translation.
index 741cb3233435a4e5284ba30a1ec824fd9cd53f22..38603bbb3e6d49a3126d1faf356a7564a6546d3f 100644 (file)
@@ -719,6 +719,31 @@ nlm_swap_auxiliary_headers_out (abfd)
        return false;
     }
 
+  /* Note - the CoPyRiGhT tag is emitted before the MeSsAgEs
+     tag in order to make the NW4.x and NW5.x loaders happy.  */
+
+  /* Write out the copyright header if there is one.  */
+  if (find_nonzero ((PTR) nlm_copyright_header (abfd),
+                   sizeof (Nlm_Internal_Copyright_Header)))
+    {
+      Nlm_External_Copyright_Header thdr;
+
+      memcpy (thdr.stamp, "CoPyRiGhT=", 10);
+      amt = sizeof (thdr.stamp);
+      if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt)
+       return false;
+      thdr.copyrightMessageLength[0] =
+       nlm_copyright_header (abfd)->copyrightMessageLength;
+      amt = 1;
+      if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt)
+       return false;
+      /* The copyright message is a variable length string.  */
+      amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1;
+      if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
+                    amt, abfd) != amt)
+       return false;
+    }
+
   /* Write out the extended header if there is one.  */
   if (find_nonzero ((PTR) nlm_extended_header (abfd),
                    sizeof (Nlm_Internal_Extended_Header)))
@@ -818,28 +843,6 @@ nlm_swap_auxiliary_headers_out (abfd)
        return false;
     }
 
-  /* Write out the copyright header if there is one.  */
-  if (find_nonzero ((PTR) nlm_copyright_header (abfd),
-                   sizeof (Nlm_Internal_Copyright_Header)))
-    {
-      Nlm_External_Copyright_Header thdr;
-
-      memcpy (thdr.stamp, "CoPyRiGhT=", 10);
-      amt = sizeof (thdr.stamp);
-      if (bfd_bwrite ((PTR) thdr.stamp, amt, abfd) != amt)
-       return false;
-      thdr.copyrightMessageLength[0] =
-       nlm_copyright_header (abfd)->copyrightMessageLength;
-      amt = 1;
-      if (bfd_bwrite ((PTR) thdr.copyrightMessageLength, amt, abfd) != amt)
-       return false;
-      /* The copyright message is a variable length string.  */
-      amt = nlm_copyright_header (abfd)->copyrightMessageLength + 1;
-      if (bfd_bwrite ((PTR) nlm_copyright_header (abfd)->copyrightMessage,
-                    amt, abfd) != amt)
-       return false;
-    }
-
   /* Write out the custom header if there is one.   */
   if (find_nonzero ((PTR) nlm_custom_header (abfd),
                    sizeof (Nlm_Internal_Custom_Header)))