Skip to content
Snippets Groups Projects
Commit 78ce4053 authored by H.J. Lu's avatar H.J. Lu Committed by H.J. Lu
Browse files

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
parent b86799ba
No related branches found
No related tags found
No related merge requests found
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> 2009-12-15 Richard Guenther <rguenther@suse.de>
* lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET. * lto.c (lto_fixup_field_decl): Fixup DECL_FIELD_OFFSET.
......
...@@ -556,6 +556,12 @@ lto_elf_file_open (const char *filename, bool writable) ...@@ -556,6 +556,12 @@ lto_elf_file_open (const char *filename, bool writable)
} }
else 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); fname = (char *) xmalloc (offset_p - filename + 1);
memcpy (fname, filename, offset_p - filename); memcpy (fname, filename, offset_p - filename);
fname[offset_p - filename] = '\0'; fname[offset_p - filename] = '\0';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment