test
[deliverable/binutils-gdb.git] / ld / ldsym.c
index 65c95a6895436f67768adb67df1d2ca3dc619cef..a948e9ea90e0cbab3342f1ca36a708b7707943b7 100644 (file)
@@ -211,7 +211,7 @@ process_keepsyms (table, size)
   ks_file = fopen (keepsyms_file, "r");
   if (!ks_file)
     {
-      info ("%X%P: cannot open keep-symbols file `%s'\n", keepsyms_file);
+      info_msg ("%X%P: cannot open keep-symbols file `%s'\n", keepsyms_file);
       goto egress;
     }
   errno = 0;
@@ -239,7 +239,7 @@ process_keepsyms (table, size)
          if (!feof (ks_file))
            /* error occurred */
            {
-             info ("%X%P: error reading keep-symbols file `%s': %E\n",
+             info_msg ("%X%P: error reading keep-symbols file `%s': %E\n",
                    keepsyms_file);
              out = end;
              goto egress;
@@ -247,7 +247,7 @@ process_keepsyms (table, size)
          if (obstack_next_free (&obstack) != obstack_base (&obstack) + 1)
            /* eof in middle of symbol */
            {
-             info ("%X%P: eof reached mid-line while reading keep-symbols file `%s'\n",
+             info_msg ("%X%P: eof reached mid-line while reading keep-symbols file `%s'\n",
                    keepsyms_file);
              out = end;
              goto egress;
@@ -268,7 +268,7 @@ process_keepsyms (table, size)
            found = 1;
          }
       if (!found)
-       info ("%P: symbol `%s' (requested to be kept) not found\n", ptr);
+       info_msg ("%P: symbol `%s' (requested to be kept) not found\n", ptr);
     }
   /* It'd be slightly faster to move this pass above the previous one,
      but that'd mean any symbols preserved in this pass would generate
@@ -304,7 +304,7 @@ list_file_locals (entry)
          /* If this is a definition,
           update it if necessary by this file's start address.  */
          if (p->flags & BSF_LOCAL)
-           info ("  %V %s\n", p->value, p->name);
+           info_msg ("  %V %s\n", p->value, p->name);
        }
     }
 }
@@ -460,7 +460,7 @@ write_file_locals (output_buffer)
                   "used by the linker" and I can't find any other code that
                   uses it.  Should be a cleaner way of doing this (like an
                   "application flags" field in the symbol structure?).  */
-               newsym->flags = BSF_LOCAL | BSF_KEEP_G;
+               newsym->flags = BSF_LOCAL | BSF_KEEP_G | BSF_FILE;
                newsym->section = s;
                *output_buffer++ = newsym;
                break;
@@ -474,14 +474,15 @@ write_file_locals (output_buffer)
 
        if (p->section == 0)
          p->section = &bfd_abs_section;
-       if (flag_is_global (p->flags))
+       if ((p->flags & BSF_GLOBAL)
+           || (p->flags & BSF_WEAK))
          {
-           /* We are only interested in outputting
-          globals at this stage in special circumstances */
+           /* If this symbol is marked as occurring now, rather than
+              at the end, output it now.  This is used for COFF C_EXT
+              FCN symbols.  FIXME: There must be a better way.  */
            if (bfd_asymbol_bfd (p) == entry->the_bfd
-               && flag_is_not_at_end (p->flags))
+               && (p->flags & BSF_NOT_AT_END))
              {
-               /* And this is one of them */
                *(output_buffer++) = p;
                p->flags |= BSF_KEEP;
              }
@@ -492,7 +493,7 @@ write_file_locals (output_buffer)
              {
                /* Dont think about indirect symbols */
              }
-           else if (flag_is_debugger (p->flags))
+           else if (p->flags & BSF_DEBUGGING)
              {
                /* Only keep the debugger symbols if no stripping required */
                if (strip_symbols == STRIP_NONE)
@@ -505,7 +506,7 @@ write_file_locals (output_buffer)
              {
                /* These must be global.  */
              }
-           else if (flag_is_ordinary_local (p->flags))
+           else if (p->flags & BSF_LOCAL)
              {
                if (discard_locals == DISCARD_ALL)
                  {
@@ -620,7 +621,7 @@ ldsym_write ()
   if (keepsyms_file != 0
       && strip_symbols != STRIP_SOME)
     {
-      info ("%P: `-retain-symbols-file' overrides `-s' and `-S'\n");
+      info_msg ("%P: `-retain-symbols-file' overrides `-s' and `-S'\n");
       strip_symbols = STRIP_SOME;
     }
   if (strip_symbols != STRIP_ALL)
This page took 0.024887 seconds and 4 git commands to generate.