This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] put exception tables for comdat functions in comdat, too


On 08/06/2012 11:45 AM, Richard Henderson wrote:
On 08/05/2012 08:40 PM, Sandra Loosemore wrote:
2012-08-04  Paul Brook<paul@codesourcery.com>
         Sandra Loosemore<sandra@codesourcery.com>

     gcc/
     * except.c (switch_to_exception_section): Place tables for
     DECL_ONE_ONLY functions in comdat groups.

Mostly ok.


-	      s = get_section (section_name, flags, NULL);
+	      s = get_section (section_name, flags, current_function_decl);

Not correct, since we're not putting the function in that section. We have no decl for the actual eh data.

This use of the function decl doesn't indicate that we're putting the function in this section; it represents the group symbol for the comdat group the section belongs in. Without this part of the patch, there is nothing to tie the section being used for the eh tables for fnname to the comdat group for fnname, and default_elf_asm_named_section segfaults on the assumption that all comdat sections have a non-null decl for the purposes of the GroupName,comdat assembler syntax.


Compare to default_function_rodata_section in varasm.c for an existing similar call to get_section.

OK to commit the patch as originally posted?

-Sandra


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]