]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Stop if the command line option file is missing
authorH.J. Lu <hongjiu.lu@intel.com>
Sat, 2 Jan 2010 17:30:12 +0000 (17:30 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Sat, 2 Jan 2010 17:30:12 +0000 (09:30 -0800)
2010-01-02  H.J. Lu  <hongjiu.lu@intel.com>

PR lto/42580
* lto-elf.c (lto_elf_file_open): Stop if the command line
option file is missing.

From-SVN: r155575

gcc/lto/ChangeLog
gcc/lto/lto-elf.c

index 04807e300262564b5d068ef84ad5a5c00b735c27..2aa86db9d07a896b1389100c8f471fdc7722a98e 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR lto/42580
+       * lto-elf.c (lto_elf_file_open): Stop if the command line
+       option file is missing.
+
 2009-12-15  Richard Guenther  <rguenther@suse.de>
 
        * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
index 7c5453a41bf143b215e2908bde814c97c1aa41be..0311ddefb230e1efd304685c4f3a3a05850be5d7 100644 (file)
@@ -556,6 +556,12 @@ lto_elf_file_open (const char *filename, bool writable)
     }
   else
     {
+      /* The file started with '@' is a file containing command line
+        options.  Stop if it doesn't exist.  */
+      if (offset_p == filename)
+       fatal_error ("command line option file '%s' does not exist",
+                    filename);
+
       fname = (char *) xmalloc (offset_p - filename + 1);
       memcpy (fname, filename, offset_p - filename);
       fname[offset_p - filename] = '\0';