printf("%s:\n", label);
}
-/* Provide proper symbols relocatability by their '_text' relativeness. */
-static void output_address(unsigned long long addr)
-{
- if (_text <= addr)
- printf("\tPTR\t_text + %#llx\n", addr - _text);
- else
- printf("\tPTR\t_text - %#llx\n", _text - addr);
-}
-
/* uncompress a compressed symbol. When this function is called, the best table
* might still be compressed itself, so the function needs to be recursive */
static int expand_symbol(const unsigned char *data, int len, char *result)
printf("\n");
output_label("kallsyms_relative_base");
- output_address(relative_base);
+ /* Provide proper symbols relocatability by their '_text' relativeness. */
+ if (_text <= relative_base)
+ printf("\tPTR\t_text + %#llx\n", relative_base - _text);
+ else
+ printf("\tPTR\t_text - %#llx\n", _text - relative_base);
printf("\n");
sort_symbols_by_name();