summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-10-03 22:00:56 +0200
committerH. Peter Anvin <hpa@zytor.com>2008-10-03 22:42:04 +0200
commitcc65f1ec192dc54de57483194502e9fa00934c39 (patch)
tree047f2247cc3a40e5101e2a693ed4ca9a6cae6b2b /arch/x86/boot/compressed
parente1000e: Fix incorrect debug warning (diff)
downloadlinux-cc65f1ec192dc54de57483194502e9fa00934c39.tar.xz
linux-cc65f1ec192dc54de57483194502e9fa00934c39.zip
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 <pageexec@freemail.hu>. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/compressed')
-rw-r--r--arch/x86/boot/compressed/relocs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c
index a1310c52fc0c..857e492c571e 100644
--- a/arch/x86/boot/compressed/relocs.c
+++ b/arch/x86/boot/compressed/relocs.c
@@ -492,7 +492,7 @@ static void walk_relocs(void (*visit)(Elf32_Rel *rel, Elf32_Sym *sym))
continue;
}
sh_symtab = sec_symtab->symtab;
- sym_strtab = sec->link->strtab;
+ sym_strtab = sec_symtab->link->strtab;
for (j = 0; j < sec->shdr.sh_size/sizeof(Elf32_Rel); j++) {
Elf32_Rel *rel;
Elf32_Sym *sym;