ppc64 constify
[deliverable/binutils-gdb.git] / bfd / syms.c
index c1de8ebab17c5e7633357d765c0dcc60ca308b9e..cb25af17fa1da372a2b46c154e5d201e01fda8be 100644 (file)
@@ -653,10 +653,10 @@ bfd_decode_symclass (asymbol *symbol)
 
   if (symbol->section && bfd_is_com_section (symbol->section))
     {
-      if (symbol->section == bfd_com_section_ptr)
-       return 'C';
-      else
+      if (symbol->section->flags & SEC_SMALL_DATA)
        return 'c';
+      else
+       return 'C';
     }
   if (bfd_is_und_section (symbol->section))
     {
@@ -830,8 +830,7 @@ _bfd_generic_read_minisymbols (bfd *abfd,
 
  error_return:
   bfd_set_error (bfd_error_no_symbols);
-  if (syms != NULL)
-    free (syms);
+  free (syms);
   return -1;
 }
 
@@ -1054,8 +1053,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
                                            symbols);
       if (reloc_count < 0)
        {
-         if (reloc_vector != NULL)
-           free (reloc_vector);
+         free (reloc_vector);
          return FALSE;
        }
       if (reloc_count > 0)
@@ -1086,8 +1084,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
                  _bfd_error_handler
                    (_("unsupported .stab relocation"));
                  bfd_set_error (bfd_error_invalid_operation);
-                 if (reloc_vector != NULL)
-                   free (reloc_vector);
+                 free (reloc_vector);
                  return FALSE;
                }
 
@@ -1099,8 +1096,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
            }
        }
 
-      if (reloc_vector != NULL)
-       free (reloc_vector);
+      free (reloc_vector);
 
       /* First time through this function, build a table matching
         function VM addresses to stabs, then sort based on starting
@@ -1468,6 +1464,7 @@ _bfd_nosymbols_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
 const char *
 _bfd_nosymbols_get_symbol_version_string (bfd *abfd,
                                          asymbol *symbol ATTRIBUTE_UNUSED,
+                                         bfd_boolean base_p ATTRIBUTE_UNUSED,
                                          bfd_boolean *hidden ATTRIBUTE_UNUSED)
 {
   return (const char *) _bfd_ptr_bfd_null_error (abfd);
This page took 0.02412 seconds and 4 git commands to generate.