Skip to content

Commit 80ffbaa

Browse files
jbeulichmasahir0y
authored andcommitted
kallsyms: reduce size a little on 64-bit
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 11da3a7 commit 80ffbaa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kernel/kallsyms.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern const u8 kallsyms_names[] __weak;
3737
* Tell the compiler that the count isn't in the small data section if the arch
3838
* has one (eg: FRV).
3939
*/
40-
extern const unsigned long kallsyms_num_syms
40+
extern const unsigned int kallsyms_num_syms
4141
__attribute__((weak, section(".rodata")));
4242

4343
extern const unsigned long kallsyms_relative_base
@@ -46,7 +46,7 @@ __attribute__((weak, section(".rodata")));
4646
extern const u8 kallsyms_token_table[] __weak;
4747
extern const u16 kallsyms_token_index[] __weak;
4848

49-
extern const unsigned long kallsyms_markers[] __weak;
49+
extern const unsigned int kallsyms_markers[] __weak;
5050

5151
/*
5252
* Expand a compressed symbol data into the resulting uncompressed string,

scripts/kallsyms.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ static void write_src(void)
405405
}
406406

407407
output_label("kallsyms_num_syms");
408-
printf("\tPTR\t%u\n", table_cnt);
408+
printf("\t.long\t%u\n", table_cnt);
409409
printf("\n");
410410

411411
/* table of offset markers, that give the offset in the compressed stream
@@ -434,7 +434,7 @@ static void write_src(void)
434434

435435
output_label("kallsyms_markers");
436436
for (i = 0; i < ((table_cnt + 255) >> 8); i++)
437-
printf("\tPTR\t%d\n", markers[i]);
437+
printf("\t.long\t%u\n", markers[i]);
438438
printf("\n");
439439

440440
free(markers);

0 commit comments

Comments
 (0)