aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kallsyms.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 4c1ad0acbb4b..f359b730c2c5 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -277,8 +277,12 @@ static void write_src(void)
277 output_label("kallsyms_addresses"); 277 output_label("kallsyms_addresses");
278 for (i = 0; i < table_cnt; i++) { 278 for (i = 0; i < table_cnt; i++) {
279 if (toupper(table[i].sym[0]) != 'A') { 279 if (toupper(table[i].sym[0]) != 'A') {
280 printf("\tPTR\t_text + %#llx\n", 280 if (_text <= table[i].addr)
281 table[i].addr - _text); 281 printf("\tPTR\t_text + %#llx\n",
282 table[i].addr - _text);
283 else
284 printf("\tPTR\t_text - %#llx\n",
285 _text - table[i].addr);
282 } else { 286 } else {
283 printf("\tPTR\t%#llx\n", table[i].addr); 287 printf("\tPTR\t%#llx\n", table[i].addr);
284 } 288 }