• Kai Germaschewski's avatar
    kbuild: Add CONFIG_MODVERSIONING and __kcrctab · a6b99776
    Kai Germaschewski authored
    This patch adds the new config option CONFIG_MODVERSIONING which will
    be the new way of checking for ABI changes between kernel and module
    code.
    
    This and the following patches are in part based on an initial
    implementation by Rusty Russell and I believe some of the ideas go back
    to discussions on linux-kbuild, Keith Owens and Rusty.
    
    though I'm not sure I think credit for the basic idea of
    storing version info in sections goes to Keith Owens and Rusty.
    
    o Rename __gpl_ksymtab to __ksymtab_gpl since that looks more consistent
      and appending _gpl instead of putting it into the middle simplifies
      sharing code for EXPORT_SYMBOL() and EXPORT_SYMBOL_GPL()
    o Add CONFIG_MODVERSIONING
    o If CONFIG_MODVERSIONING is set, add a section __kcrctab{,_gpl}, which
      contains the ABI checksums for the exported symbols listed in 
      __ksymtab{,_crc} Since we don't know the checksums yet at compilation
      time, just make them an unresolved symbol which gets filled in by the
      linker later.
    a6b99776
vmlinux.lds.h 1.33 KB