* config/tc-sh.h (struct sh_segment_info_type): Define.
[deliverable/binutils-gdb.git] / gas / config / obj-coff.c
index 94078e85c0a7114c72ea5b35ec082596e6dc3671..424feecaa5132908fdf8d548972df0b544e6a4ce 100644 (file)
@@ -962,6 +962,7 @@ coff_frob_symbol (symp, punt)
     {
       symbolS *real;
       if (!SF_GET_LOCAL (symp)
+         && !SF_GET_STATICS (symp)
          && (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
          && real != symp)
        {
@@ -2600,6 +2601,7 @@ yank_symbols ()
 
          /* L* and C_EFCN symbols never merge. */
          if (!SF_GET_LOCAL (symbolP)
+             && !SF_GET_STATICS (symbolP)
              && S_GET_STORAGE_CLASS (symbolP) != C_LABEL
              && symbolP->sy_value.X_op == O_constant
              && (real_symbolP = symbol_find_base (S_GET_NAME (symbolP), DO_NOT_STRIP))
@@ -2724,7 +2726,8 @@ yank_symbols ()
        {
          /* If the filename was too long to fit in the
             auxent, put it in the string table */
-         if (SA_GET_FILE_FNAME_ZEROS (symbolP) == 0)
+         if (SA_GET_FILE_FNAME_ZEROS (symbolP) == 0
+             && SA_GET_FILE_FNAME_OFFSET (symbolP) != 0)
            {
              SA_SET_FILE_FNAME_OFFSET (symbolP, string_byte_count);
              string_byte_count += strlen (filename_list_scan->filename) + 1;
@@ -2940,7 +2943,6 @@ w_strings (where)
 {
   symbolS *symbolP;
   struct filename_list *filename_list_scan = filename_list_head;
-  unsigned int i;
 
   /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */
   md_number_to_chars (where, (valueT) string_byte_count, 4);
@@ -2949,18 +2951,22 @@ w_strings (where)
 #ifdef COFF_LONG_SECTION_NAMES
   /* Support long section names as found in PE.  This code must
      coordinate with that in coff_header_append and write_object_file.  */
-  for (i = SEG_E0; i < SEG_LAST; i++)
-    {
-      if (segment_info[i].scnhdr.s_name[0]
-         && strlen (segment_info[i].name) > SCNNMLEN)
-       {
-         unsigned int size;
+  {
+    unsigned int i;
 
-         size = strlen (segment_info[i].name) + 1;
-         memcpy (where, segment_info[i].name, size);
-         where += size;
-       }
-    }
+    for (i = SEG_E0; i < SEG_LAST; i++)
+      {
+       if (segment_info[i].scnhdr.s_name[0]
+           && strlen (segment_info[i].name) > SCNNMLEN)
+         {
+           unsigned int size;
+
+           size = strlen (segment_info[i].name) + 1;
+           memcpy (where, segment_info[i].name, size);
+           where += size;
+         }
+      }
+  }
 #endif /* COFF_LONG_SECTION_NAMES */
 
   for (symbolP = symbol_rootP;
@@ -2976,7 +2982,8 @@ w_strings (where)
          where += size;
        }
       if (S_GET_STORAGE_CLASS (symbolP) == C_FILE
-         && SA_GET_FILE_FNAME_ZEROS (symbolP) == 0)
+         && SA_GET_FILE_FNAME_ZEROS (symbolP) == 0
+         && SA_GET_FILE_FNAME_OFFSET (symbolP) != 0)
        {
          size = strlen (filename_list_scan->filename) + 1;
          memcpy (where, filename_list_scan->filename, size);
@@ -3533,7 +3540,7 @@ c_dot_file_symbol (filename)
       f->next = 0;
 
       SA_SET_FILE_FNAME_ZEROS (symbolP, 0);
-      SA_SET_FILE_FNAME_OFFSET (symbolP, 0);
+      SA_SET_FILE_FNAME_OFFSET (symbolP, 1);
 
       if (filename_list_tail) 
        filename_list_tail->next = f;
This page took 0.044192 seconds and 4 git commands to generate.