insmod: code shrink, stop exporting insmod_ng_main.

function                                             old     new   delta
add_ksymoops_symbols                                   -     421    +421
static.section_names                                  20      40     +20
lsmod_main                                           425     424      -1
set_tainted                                          153     150      -3
main_opts                                              4       -      -4
obj_symbol_patch                                      47      42      -5
obj_string_patch                                     144     139      -5
already_loaded                                       144     138      -6
check_dep                                            348     341      -7
append_option                                         75      68      -7
obj_allocate_commons                                 515     501     -14
new_process_module_arguments                        1039    1018     -21
arch_new_symbol                                       31       9     -22
check_module_name_match                               85      61     -24
obj_create_alloced_section                           164     136     -28
include_conf                                         930     902     -28
modprobe_main                                       1643    1535    -108
obj_load                                             924     777    -147
insmod_ng_main                                       245       -    -245
insmod_main                                         4122    3794    -328
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 1/16 up/down: 441/-1003)       Total: -562 bytes
   text    data     bss     dec     hex filename
 776020     974    9420  786414   bffee busybox_old
 775384     974    9420  785778   bfd72 busybox_unstripped
This commit is contained in:
Denis Vlasenko
2007-11-02 23:31:10 +00:00
parent 9d1afdb571
commit b68979aefa
4 changed files with 315 additions and 383 deletions

View File

@ -28,17 +28,17 @@ static void check_tainted(void)
FILE *f;
tainted = 0;
if ((f = fopen(TAINT_FILENAME, "r"))) {
f = fopen(TAINT_FILENAME, "r");
if (f) {
fscanf(f, "%d", &tainted);
fclose(f);
}
if (f && tainted) {
if (tainted) {
printf(" Tainted: %c%c%c\n",
tainted & TAINT_PROPRIETORY_MODULE ? 'P' : 'G',
tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
tainted & TAINT_UNSAFE_SMP ? 'S' : ' ');
}
else {
} else {
printf(" Not tainted\n");
}
}
@ -147,7 +147,7 @@ int lsmod_main(int argc, char **argv)
printf("Module Size Used by");
check_tainted();
#if defined(CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT)
#if ENABLE_FEATURE_LSMOD_PRETTY_2_6_OUTPUT
{
char *line;
while ((line = xmalloc_fgets(file)) != NULL) {