In Rust for Linux, they can optionally use retpolines and use these features: * `retpoline-external-thunk` * `retpoline-indirect-branches` * `retpoline-indirect-calls` GCC's `-mindirect-branch=thunk-extern` is probably equivalent to `retpoline-external-thunk`, but I'm not sure about the others.