https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119430

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Anyhow, this explains why lto and PIE are both needed to trigger the problem.

Thanks for the investigation!

> As for a solution, unless the arm port can find some way to avoid the
> register overlap for thunks that need the static chain.
> 
> Failing that, I have a hunch that the issue has to do with the call's
> crossing lto (re)compilation units, in which case one solution could be to
> sacrifice some optimization opportunities and force functions and their
> inner functions to remain in a single unit.

Is that really a MI thunk or rather a PLT stub?  In the latter case, it's a
known pitfall and, for example, you must be sure not to make functions that
require the static chain public.  But of course LTO can do its own damages.

Reply via email to