[RFC] modprobe-small: optimizations for single applet build

Denys Vlasenko vda.linux at googlemail.com
Mon Jan 9 08:49:52 UTC 2017


CONFIG_MODPROBE_SMALL=y
CONFIG_DEPMOD=y
# CONFIG_INSMOD is not set
CONFIG_LSMOD=y
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
CONFIG_MODINFO=y
# CONFIG_MODPROBE is not set
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
# CONFIG_RMMOD is not set

error: unused variable 'exitcode'

modutils/modprobe-small.c: In function 'modprobe_main':
modutils/modprobe-small.c:1060: error: control reaches end of non-void function


On Mon, Jan 9, 2017 at 8:55 AM, Kang-Che Sung <explorer09 at gmail.com> wrote:
> (I'm requesting for a review first because I fear such an aggressive
> change could lead to bugs. While I observe the sizes have reduced, I
> haven't test the functionality of each applet after that. So please
> test before merging.)
>
> Aggressively cut off unneeded code when the relevant applets are not
> built.
>
> Correct dependencies of FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE and
> FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED.
>
> Don't bother with the '-r' option check if only rmmod is built (assume
> true then), or when neither rmmod or mobprobe is built (assume false
> then).
>
> Size comparison before and after the change (single applet
> configuration):
>
>      text    data     bss     dec     hex filename
>     34778     946     112   35836    8bfc old/busybox_DEPMOD
>     34151     946     112   35209    8989 new/busybox_DEPMOD
>
>     34903     946     112   35961    8c79 old/busybox_INSMOD
>     28316     778     112   29206    7216 new/busybox_INSMOD
>
>     35228     962     112   36302    8dce old/busybox_LSMOD
>      5011     706      40    5757    167d new/busybox_LSMOD
>
>     34830     946     112   35888    8c30 old/busybox_MODPROBE
>     34795     946     112   35853    8c0d new/busybox_MODPROBE
>
>     34718     946     112   35776    8bc0 old/busybox_RMMOD
>      7502     714     104    8320    2080 new/busybox_RMMOD
>
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list