Fix typo in ChangeLog entry.
authorNick Clifton <nickc@redhat.com>
Tue, 3 Dec 2002 18:52:45 +0000 (18:52 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 3 Dec 2002 18:52:45 +0000 (18:52 +0000)
Add paranoia checks to .PPC.EMB.apuinfo merging code.

bfd/elf32-ppc.c
gas/ChangeLog

index c117f54..7cb4d86 100644 (file)
@@ -3901,6 +3901,9 @@ ppc_elf_begin_write_processing (abfd, link_info)
   unsigned long length;
   const char *  error_message = NULL;
 
+  if (link_info == NULL)
+    return;
+
   /* Scan the input bfds, looking for apuinfo sections.  */
   num_input_sections = 0;
   output_section_size = 0;
@@ -4023,7 +4026,7 @@ ppc_elf_write_section (abfd, asec, contents)
      asection * asec;
      bfd_byte * contents ATTRIBUTE_UNUSED;
 {
-  return strcmp (asec->name, APUINFO_SECTION_NAME) == 0;
+  return apuinfo_list_length () && strcmp (asec->name, APUINFO_SECTION_NAME) == 0;
 }
 
 
@@ -4044,6 +4047,9 @@ ppc_elf_final_write_processing (abfd, linker)
   if (asec == NULL)
     return;
 
+  if (apuinfo_list_length () == 0)
+    return;
+
   length = asec->_raw_size;
   if (length < 20)
     return;
index 5c59ad5..7c4f230 100644 (file)
@@ -1,7 +1,7 @@
 2002-12-03  Nick Clifton  <nickc@redhat.com>
 
        * config/tc-ppc.c (ppc_cleanup): Do not set SEC_MERGE flag on
-       .PPC.EMB>apuinfo sections.
+       .PPC.EMB.apuinfo sections.
 
 2002-12-03  Richard Henderson  <rth@redhat.com>