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

--- Comment #4 from Fangrui Song <i at maskray dot me> ---
(In reply to Andrew Pinski from comment #2)
> As a workaround, you could add the attribute no_instrument_function.

Yes. I thought of this possibility, but pcc's reply on
https://github.com/llvm/llvm-project/issues/62504 makes sense to me: the only
one reasonable way is probably to skip naked functions.


The Linux kernel ran into this combination in 2009 and they switched to use
__attribute__((naked)) and __attribute__((__no_instrument_function__)) together
in https://git.kernel.org/linus/446c92b2901bedb3725d29b4e73def8aba623ffc 

> #define __naked                               __attribute__((naked)) notrace
>
>
> (before hotpatch/patchable_function_entry) #define notrace                 
> __attribute__((__no_instrument_function__))

Reply via email to