[Bug target/93492] Broken code with -fpatchable-function-entry and -fcf-protection=full

ro at CeBiTec dot Uni-Bielefeld.DE gcc-bugzilla@gcc.gnu.org
Fri Jul 10 14:16:23 GMT 2020


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

--- Comment #30 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #29 from H.J. Lu <hjl.tools at gmail dot com> ---
> (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #28)
>> > --- Comment #27 from H.J. Lu <hjl.tools at gmail dot com> ---
>> > (In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #26)
>> >> > --- Comment #25 from H.J. Lu <hjl.tools at gmail dot com> ---
>> >> > -fpatchable-function-entry and -mfentry generate special instruction
>> >> > sequence at function entry.  Does Solaris support such special
>> >> > instruction sequence?
>> >> 
>> >> Where would such support live?  The kernel?  libc.so.1?  ld.so.1?
>> >
>> > -fpatchable-function-entry and -mfentry are used in Linux kernel.
>> 
>> In that case: no.  The Solaris kernel can (and is) compiled both by gcc
>> and Studio cc, and the latter certainly hasn't anything similar.
>
> Then just skip these tests on Solaris.

If this is a Linux-only feature, shouldn't the tests rather be
restricted to Linux instead?  It certainly also fails on freebsd,
darwin, mingw and whatever more.  Having to skip it on all those
explicitly (until we discover the next target we forgot about) seems
just the wrong way round.


More information about the Gcc-bugs mailing list