Skip to content

Commit cc65f1e

Browse files
author
H. Peter Anvin
committed
x86 setup: correct segfault in generation of 32-bit reloc kernel
Impact: segfault on build of a 32-bit relocatable kernel When converting arch/x86/boot/compressed/relocs.c to support unlimited sections, the computation of sym_strtab in walk_relocs() was done incorrectly. This causes a segfault for some people when building the relocatable 32-bit kernel. Pointed out by Anonymous <[email protected]>. Signed-off-by: H. Peter Anvin <[email protected]>
1 parent 95b866d commit cc65f1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/boot/compressed/relocs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
492492
continue;
493493
}
494494
sh_symtab = sec_symtab->symtab;
495-
sym_strtab = sec->link->strtab;
495+
sym_strtab = sec_symtab->link->strtab;
496496
for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Rel); j++) {
497497
Elf32_Rel *rel;
498498
Elf32_Sym *sym;

0 commit comments

Comments
 (0)