Don't core dump if no output section available for a symbol
authorSteve Chamberlain <sac@cygnus>
Thu, 27 Feb 1992 19:22:41 +0000 (19:22 +0000)
committerSteve Chamberlain <sac@cygnus>
Thu, 27 Feb 1992 19:22:41 +0000 (19:22 +0000)
bfd/ChangeLog
bfd/aoutx.h

index d3e36e773585c251a11f411e47393ec5d9eabe1a..e8f1935b5d0b6a2e1c7ee391a703df8412fe3776 100644 (file)
@@ -2,7 +2,8 @@ Thu Feb 27 09:24:56 1992  Steve Chamberlain  (sac at thepub.cygnus.com)
 
        * aoutx.h (translate_from_native_sym_flags): when creating an
        alias symbol, fill in the section as undefined, rather than
-       leaving it blank
+       leaving it blank. If an output section can't be found for a
+       symbol, then don't core dump.
 
 Wed Feb 26 19:40:59 1992  Steve Chamberlain  (sac at thepub.cygnus.com)
 
index 4fc8cd719a8306a339b5617292a057bc2b50006c..95c1a9278be4f1a039c30294e2c9017959d76504 100644 (file)
@@ -951,8 +951,19 @@ DEFUN(translate_to_native_sym_flags,(sym_pointer, cache_ptr, abfd),
       sym_pointer->e_type[0] = (N_UNDF | N_EXT);
     }    
   else {    
-      bfd_error_vector.nonrepresentable_section(abfd,
-                                               bfd_get_output_section(cache_ptr)->name);
+      if (cache_ptr->section->output_section) 
+      {
+       
+       bfd_error_vector.nonrepresentable_section(abfd,
+                                                 bfd_get_output_section(cache_ptr)->name);
+      }
+      else 
+      {
+       bfd_error_vector.nonrepresentable_section(abfd,
+                                                 cache_ptr->section->name);
+       
+      }
+      
     }
   /* Turn the symbol from section relative to absolute again */