Commit 5a013dc4 by Richard Guenther Committed by Richard Biener

re PR lto/41597 (Bad .comm directive)

2010-01-02  Richard Guenther  <rguenther@suse.de>

	PR lto/41597
	* toplev.c (compile_file): Emit LTO marker properly.  Change
	it to __gnu_lto_v1.
	* collect2.c (scan_prog_file): Adjust for changed LTO marker.

From-SVN: r155563
parent 3bbf8fa4
2010-01-02 Richard Guenther <rguenther@suse.de>
PR lto/41597
* toplev.c (compile_file): Emit LTO marker properly. Change
it to __gnu_lto_v1.
* collect2.c (scan_prog_file): Adjust for changed LTO marker.
2010-01-01 Richard Guenther <rguenther@suse.de>
PR debug/42455
......
/* Collect static initialization info into data structures that can be
traversed by C++ initialization and finalization routines.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Chris Smith (csmith@convex.com).
Heavily modified by Michael Meissner (meissner@cygnus.com),
......@@ -2634,8 +2634,8 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
the LTO objects list if found. */
for (p = buf; (ch = *p) != '\0' && ch != '\n'; p++)
if (ch == ' '
&& (strncmp (p +1 , "gnu_lto_v1", 10) == 0)
&& ISSPACE( p[11]))
&& (strncmp (p + 1, "__gnu_lto_v1", 12) == 0)
&& ISSPACE (p[13]))
{
add_lto_object (&lto_objects, prog_name);
......
/* Top level of GCC compilers (cc1, cc1plus, etc.)
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GCC.
......@@ -1104,7 +1104,20 @@ compile_file (void)
link errors if an object file with IL is stored into a shared
library without invoking lto1. */
if (flag_generate_lto)
fprintf (asm_out_file,"\t.comm\tgnu_lto_v1,1,1\n");
{
#if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
"__gnu_lto_v1",
(unsigned HOST_WIDE_INT) 1, 8);
#elif defined ASM_OUTPUT_ALIGNED_COMMON
ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, "__gnu_lto_v1",
(unsigned HOST_WIDE_INT) 1, 8);
#else
ASM_OUTPUT_COMMON (asm_out_file, "__gnu_lto_v1",
(unsigned HOST_WIDE_INT) 1,
(unsigned HOST_WIDE_INT) 1);
#endif
}
/* Attach a special .ident directive to the end of the file to identify
the version of GCC which compiled this code. The format of the .ident
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment