bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/18440] ICF depends on the section name to detect constructors


From: tmsriram at google dot com
Subject: [Bug gold/18440] ICF depends on the section name to detect constructors and destructors
Date: Thu, 21 May 2015 04:09:58 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18440

--- Comment #1 from Sriraman Tallam <tmsriram at google dot com> ---
On Wed, May 20, 2015 at 7:27 PM, rafael.espindola at gmail dot com
<address@hidden> wrote:
> https://sourceware.org/bugzilla/show_bug.cgi?id=18440
>
>             Bug ID: 18440
>            Summary: ICF depends on the section name to detect constructors
>                     and destructors
>            Product: binutils
>            Version: unspecified
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: gold
>           Assignee: ccoutant at gmail dot com
>           Reporter: rafael.espindola at gmail dot com
>                 CC: ian at airs dot com, tmsriram at google dot com
>   Target Milestone: ---
>
> ICF has the following logic
>
>           // With --icf=safe, check if the mangled function name is a ctor
>           // or a dtor.  The mangled function name can be obtained from the
>           // section name by stripping the section prefix.
>           if (parameters->options().icf_safe_folding()
>               && !is_function_ctor_or_dtor(section_name)
>               && (!target.can_check_for_function_pointers()
>                   || section_has_function_pointers(*p, i)))
>             {
>               continue;
>             }
>
> This unfortunately doesn't work if the compiler avoids producing the long
> section names (as llvm now can).

Can we use the symbol name directly?

>
> Is there a convenient pass over the symbols that could be used for this
> instead?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]