Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kallsyms: squash output_address()

After commit 64e166099b69 ("kallsyms: get rid of code for absolute,
kallsyms"), there is only one call site for output_address(). Squash it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+5 -10
+5 -10
scripts/kallsyms.c
··· 292 292 printf("%s:\n", label); 293 293 } 294 294 295 - /* Provide proper symbols relocatability by their '_text' relativeness. */ 296 - static void output_address(unsigned long long addr) 297 - { 298 - if (_text <= addr) 299 - printf("\tPTR\t_text + %#llx\n", addr - _text); 300 - else 301 - printf("\tPTR\t_text - %#llx\n", _text - addr); 302 - } 303 - 304 295 /* uncompress a compressed symbol. When this function is called, the best table 305 296 * might still be compressed itself, so the function needs to be recursive */ 306 297 static int expand_symbol(const unsigned char *data, int len, char *result) ··· 479 488 printf("\n"); 480 489 481 490 output_label("kallsyms_relative_base"); 482 - output_address(relative_base); 491 + /* Provide proper symbols relocatability by their '_text' relativeness. */ 492 + if (_text <= relative_base) 493 + printf("\tPTR\t_text + %#llx\n", relative_base - _text); 494 + else 495 + printf("\tPTR\t_text - %#llx\n", _text - relative_base); 483 496 printf("\n"); 484 497 485 498 sort_symbols_by_name();