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

Alan Modra <amodra at gmail dot com> changed:

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

--- Comment #5 from Alan Modra <amodra at gmail dot com> ---
The default implementation of -fpatchable-function-entry is broken and useless
on powerpc64 ELFv1 and ELFv2.  For ELFv1 we get

        .section        ".opd","aw"
        .align 3
_Z3foov:
        .quad   .L._Z3foov,.TOC.@tocbase,0
        .previous
        .type   _Z3foov, @function
.L._Z3foov:
        .section        __patchable_function_entries,"awo",@progbits,_Z3foov
        .align 3
        .8byte  .LPFE1
        .section        .text._Z3foov,"axG",@progbits,_Z3foov,comdat
.LPFE1:
        nop

So the "o" flag symbol is one in the .opd section, rather than what would be
correct here, .L._Z3foov.

The implementation is even more useless for ELFv2, with the nop appearing in
the global entry code (so providing patch space for only some calls of the
function),
which results in assembler complaints about ".localentry expression is not a
power of 2".

I don't think there is anything wrong with the new testcase, just a lack of
xfail powerpc64*-*-*.

Reply via email to