Skip to contentSkip to conversation

fix broken kallsyms on non-x86 archs

PATCH New James Bottomley 1 participant 1 message Jan 12, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix broken kallsyms on non-x86 archs

kallsyms is broken in parisc on 2.5.56 again because of assembler syntax subtleties. This is the offending line:

printf("\t.byte 0x%02x ; .asciz\t\"%s\"\n"

Note the ;' separating the two statements. On some platforms ;' is a comment in assembly code, and thus the following .asciz is ignored. The fix is attached.

James

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

scripts/kallsyms.c +1 -1
@@ -144,7 +144,7 @@
 		for (k = 0; table[i].sym[k] && table[i].sym[k] == prev[k]; ++k)
 			; 
 
-		printf("\t.byte 0x%02x ; .asciz\t\"%s\"\n", k, table[i].sym + k);
+		printf("\t.byte 0x%02x\n\t.asciz\t\"%s\"\n", k, table[i].sym + k);
 		last_addr = table[i].addr;
 		prev = table[i].sym;
 	}