• Uwe Kleine-König's avatar
    modpost: Don't let "driver"s reference .exit.* · f177cd0c
    Uwe Kleine-König authored
    Drivers must not reference functions marked with __exit as these likely
    are not available when the code is built-in.
    
    There are few creative offenders uncovered for example in ARCH=amd64
    allmodconfig builds. So only trigger the section mismatch warning for
    W=1 builds.
    
    The dual rule that drivers must not reference .init.* is implemented
    since commit 0db25245 ("modpost: don't allow *driver to reference
    .init.*") which however missed that .exit.* should be handled in the
    same way.
    
    Thanks to Masahiro Yamada and Arnd Bergmann who gave valuable hints to
    find this improvement.
    Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    f177cd0c
modpost.c 59.5 KB