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<p...@codesourcery.com>
Sandra Loosemore<san...@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