]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kallsyms: reduce size a little on 64-bit
authorJan Beulich <JBeulich@suse.com>
Mon, 3 Sep 2018 12:09:34 +0000 (06:09 -0600)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 10 Sep 2018 13:54:33 +0000 (22:54 +0900)
Both kallsyms_num_syms and kallsyms_markers[] don't really need to use
unsigned long as their (base) types; unsigned int fully suffices.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
kernel/kallsyms.c
scripts/kallsyms.c

index 02a0b01380d8ef678bf544054cacf586292fb0e1..f3a04994e0637c1180db334c582859f988fdfb3d 100644 (file)
@@ -37,7 +37,7 @@ extern const u8 kallsyms_names[] __weak;
  * Tell the compiler that the count isn't in the small data section if the arch
  * has one (eg: FRV).
  */
-extern const unsigned long kallsyms_num_syms
+extern const unsigned int kallsyms_num_syms
 __attribute__((weak, section(".rodata")));
 
 extern const unsigned long kallsyms_relative_base
@@ -46,7 +46,7 @@ __attribute__((weak, section(".rodata")));
 extern const u8 kallsyms_token_table[] __weak;
 extern const u16 kallsyms_token_index[] __weak;
 
-extern const unsigned long kallsyms_markers[] __weak;
+extern const unsigned int kallsyms_markers[] __weak;
 
 /*
  * Expand a compressed symbol data into the resulting uncompressed string,
index a9186a98a37d1342cd58446b29804e47f712b168..085b6a584fe04a545f41987146c0e216ba640659 100644 (file)
@@ -405,7 +405,7 @@ static void write_src(void)
        }
 
        output_label("kallsyms_num_syms");
-       printf("\tPTR\t%u\n", table_cnt);
+       printf("\t.long\t%u\n", table_cnt);
        printf("\n");
 
        /* table of offset markers, that give the offset in the compressed stream
@@ -434,7 +434,7 @@ static void write_src(void)
 
        output_label("kallsyms_markers");
        for (i = 0; i < ((table_cnt + 255) >> 8); i++)
-               printf("\tPTR\t%d\n", markers[i]);
+               printf("\t.long\t%u\n", markers[i]);
        printf("\n");
 
        free(markers);