OSDN Git Service

* config/elfos.h (SELECT_SECTION): Decide whether to use a data or
[pf3gnuchains/gcc-fork.git] / gcc / tlink.c
index 3fdd135..32685b1 100644 (file)
@@ -550,9 +550,15 @@ read_repo_files (object_lst)
 
   for (; *object; object++)
     {
-      const char *p = frob_extension (*object, ".rpo");
+      const char *p;
       file *f;
 
+      /* Don't bother trying for ld flags.  */
+      if (*object[0] == '-')
+       continue;
+
+      p = frob_extension (*object, ".rpo");
+
       if (! file_exists (p))
        continue;
 
@@ -638,6 +644,11 @@ scan_linker_output (fname)
          else if (p = index (oldq, '"'), p)
            p++, q = index (p, '"');
 
+         /* Don't let the strstr's below see the demangled name; we
+            might get spurious matches.  */
+         if (p)
+           p[-1] = '\0';
+
          /* We need to check for certain error keywords here, or we would
             mistakenly use GNU ld's "In function `foo':" message.  */
          if (q && (strstr (oldq, "ndefined")