https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99888
Fangrui Song <i at maskray dot me> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |i at maskray dot me --- Comment #5 from Fangrui Song <i at maskray dot me> --- * There is a restriction on the number of instructions between the function label and the .localentry directive. * For -fpatchable-function-entry=N[,M], M nops must precede the function label. On aarch64/x86/etc, these nops are consecutive. Personally I think this condition can be lifted for PowerPC ELFv2. The runtime library will need to check st_other or do some instruction inspection, which may be fine. nop nop nop foo: .LCF0: .cfi_startproc addis 2,12,.TOC.-.LCF0@ha addi 2,2,.TOC.-.LCF0@l .localentry foo,.-foo nop nop