aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2010-01-02 17:30:12 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2010-01-02 09:30:12 -0800
commit78ce4053fa82a756bf2cb1a9e60d95a4f3ba7b05 (patch)
treeaa63f80f30eea3b47715c0a155046e0c4eea6f65 /gcc/lto
parentb86799bae571d5bbc2337de0afcf4352fb9c1ea0 (diff)
downloadgcc-78ce4053fa82a756bf2cb1a9e60d95a4f3ba7b05.zip
gcc-78ce4053fa82a756bf2cb1a9e60d95a4f3ba7b05.tar.gz
gcc-78ce4053fa82a756bf2cb1a9e60d95a4f3ba7b05.tar.bz2
Stop if the command line option file is missing
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
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto-elf.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 04807e3..2aa86db 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -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.
diff --git a/gcc/lto/lto-elf.c b/gcc/lto/lto-elf.c
index 7c5453a..0311dde 100644
--- a/gcc/lto/lto-elf.c
+++ b/gcc/lto/lto-elf.c
@@ -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';