[lto]: PATCH: New section names.

Mark Mitchell mark@codesourcery.com
Sat Sep 9 03:36:00 GMT 2006


Kenneth Zadeck wrote:

> 2006-09-08  Kenneth Zadeck <zadeck@naturalbridge.com>
>     * gcc/lto-function-out.c (produce_asm): Changed section name.
>     * gcc/lto-tags.h (LTO_SECTION_NAME_PREFIX): New symbol.
> 

> -  tree fn = DECL_SECTION_NAME (function);
> +  tree fn = DECL_ASSEMBLER_NAME (function);
>    char * section_name = xmalloc (SECTION_NAME_SIZE + 1);

Shouldn't this be something like:

   char *section_name = CONCAT (LTO_SECTION_NAME_PREFIX,
                                IDENTIFIER_POINTER (fn));

With the change you made to "fn", using SECTION_NAME_SIZE is no longer safe.

Thanks for doing this; I hope to wire up the bits to go find these 
sections this weekend.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list