Skip to content
  • Emese Revfy's avatar
    GCC plugin infrastructure · 6b90bd4b
    Emese Revfy authored
    This patch allows to build the whole kernel with GCC plugins. It was ported from
    grsecurity/PaX. The infrastructure supports building out-of-tree modules and
    building in a separate directory. Cross-compilation is supported too.
    Currently the x86, arm, arm64 and uml architectures enable plugins.
    
    The directory of the gcc plugins is scripts/gcc-plugins. You can use a file or a directory
    there. The plugins compile with these options:
     * -fno-rtti: gcc is compiled with this option so the plugins must use it too
     * -fno-exceptions: this is inherited from gcc too
     * -fasynchronous-unwind-tables: this is inherited from gcc too
     * -ggdb: it is useful for debugging a plugin (better backtrace on internal
        errors)
     * -Wno-narrowing: to suppress warnings from gcc headers (ipa-utils.h)
     * -Wno-unused-variable: to suppress warnings from gcc headers (gcc_version
        variable, plugin-version.h)
    
    The infrastructure introduces a new Makefile target called gcc-plugins. It
    supports all gcc versio...
    6b90bd4b