Last Comment Bug 675867 - Enable Identical Code Folding when supported by the linker
: Enable Identical Code Folding when supported by the linker
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All Linux
: -- normal (vote)
: mozilla8
Assigned To: Mike Hommey [:glandium]
:
:
Mentors:
Depends on:
Blocks: 673262
  Show dependency treegraph
 
Reported: 2011-08-01 23:21 PDT by Mike Hommey [:glandium]
Modified: 2011-08-09 11:49 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Enable Identical Code Folding when supported by the linker (3.37 KB, patch)
2011-08-02 06:03 PDT, Mike Hommey [:glandium]
ted: review+
Details | Diff | Splinter Review

Description Mike Hommey [:glandium] 2011-08-01 23:21:30 PDT

    
Comment 1 Mike Hommey [:glandium] 2011-08-02 06:03:59 PDT
Created attachment 550060 [details] [diff] [review]
Enable Identical Code Folding when supported by the linker

This is quite bothering. The latest released version of gold (2.21.1), which supports ICF, crashes when building our code, but not when building the small test case. I tried to reduce some source code that triggers the crash, but it's still more than a thousand lines of code...
I'm tempted to default to disable icf and enable it with mozconfig when we have a toolchain that supports ICF and doesn't crash, but it means linux distros will have to be aware of the option...

On the other hand, it only seems to crash when targetting ARM, so maybe the risk is pretty limited.
Comment 2 Ted Mielczarek [:ted.mielczarek] 2011-08-08 09:34:38 PDT
Comment on attachment 550060 [details] [diff] [review]
Enable Identical Code Folding when supported by the linker

Review of attachment 550060 [details] [diff] [review]:
-----------------------------------------------------------------

Is there a particular reason you need to sanity-check that the functions actually got folded, and you can't just trust that the linker does the right thing when you pass that option?
Comment 3 Mike Hommey [:glandium] 2011-08-08 09:45:34 PDT
(In reply to Ted Mielczarek [:ted, :luser] from comment #2)
> Is there a particular reason you need to sanity-check that the functions
> actually got folded, and you can't just trust that the linker does the right
> thing when you pass that option?

Android NDK's ld 2.19 accepts the option but does nothing. It's better to avoid surprises as to why -Wl,--icf is used but has no effect...

Note You need to log in before you can comment on or make changes to this bug.