Skip to contentSkip to conversation

fix bug in scripts/kallsyms.c

PATCH New James Bottomley 1 participant 1 message Dec 21, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix bug in scripts/kallsyms.c

kallsyms.c generates the symbol table in a .S file using the assembler .string macro. Unfortunately, the .string macro is implemented in a platform specific way (it may or may not zero terminate the string). On parisc, it doesn't zero terminate, so the symbol table search doesn't work.

The solution is to replace .string with .asciz which is guaranteed to do the correct thing on all platforms.

James

===== scripts/kallsyms.c 1.2 vs edited =====

scripts/kallsyms.c +1 -1
@@ -128,7 +128,7 @@
 		if (table[i].addr == last_addr)
 			continue;
 
-		printf("\t.string\t\"%s\"\n", table[i].sym);
+		printf("\t.asciz\t\"%s\"\n", table[i].sym);
 		last_addr = table[i].addr;
 	}
 	printf("\n");