diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 81f5e2bef37cf6b7a6ceff2a89c2da82f71ab433..f153d80a8f2bd6e87a1a199bcfa5713876845607 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/gcc/collect2.c b/gcc/collect2.c index aa4b549b11b0d06fbc34d72ddbf1055744d2c0cf..10adc889aece142243f087f743c8e31ce11332e4 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -1,7 +1,7 @@ /* 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 (<o_objects, prog_name); diff --git a/gcc/toplev.c b/gcc/toplev.c index 7b7475489e31425ba649094a1bdfce5320d9bdd7..e916c8de88cd90568f5bf92df6b5c9842f50de29 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1,6 +1,6 @@ /* 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