http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59672
--- Comment #4 from H. Peter Anvin <hpa at zytor dot com> --- You are missing the plain fact that *it is already working*. .code16gcc is a binutils directive which takes 32-bit code emitted by gcc and assembles it to produce valid (although suboptimal) 16-bit code. So it really *is* just a matter of putting the directive in the right place. And yes, it is used before entering protected mode.