https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104816
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Andrew Cooper from comment #4) > I've worked around this in Xen with: > https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff; > h=9d4a44380d273de22d5753883cbf5581795ff24d and > https://lore.kernel.org/lkml/YiXpv0q88paPHPqF@hirez.programming.kicks-ass. > net/ is pending for Linux. > > IMO, it's an error that -fcf-protection=branch is not obeyed for jump > tables, and we don't want to end up in a situation where jump tables are > unusable with CET. Are you suggesting to add an option to generate jump table with ENDBR?