diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 4c1ad0acbb4b096ac056755b407ab743235b7f1a..f359b730c2c57572b46f47f7c344137c7b5f9c55 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -277,8 +277,12 @@ static void write_src(void)
 	output_label("kallsyms_addresses");
 	for (i = 0; i < table_cnt; i++) {
 		if (toupper(table[i].sym[0]) != 'A') {
-			printf("\tPTR\t_text + %#llx\n",
-				table[i].addr - _text);
+			if (_text <= table[i].addr)
+				printf("\tPTR\t_text + %#llx\n",
+					table[i].addr - _text);
+			else
+				printf("\tPTR\t_text - %#llx\n",
+					_text - table[i].addr);
 		} else {
 			printf("\tPTR\t%#llx\n", table[i].addr);
 		}