History

kbuild: fix modpost compile with older gcc

The kernel now requires that CC be 3.1.0 or higher. But we shouldn't place that requirement upon HOSTCC unless we really need to. Fixes my ia64 problem.

akpm@osdl.org committed 20 years ago

Commit fededcd1 parent 0f558c31 file · +3 −3Browse files

Showing the changes to scripts/mod (1 of 1 file). Show all

Unified · Split

scripts/mod/modpost.c+3−3
@@ -590,14 +590,14 @@ static void check_sec_ref(struct module *mod, const char *modname, · 589 unmodified lines
590590
591591 /* Walk through all sections */
592592 for (i = 0; i < hdr->e_shnum; i++) {
593+ Elf_Rela *rela;
594+ Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset;
595+ Elf_Rela *stop = (void*)start + sechdrs[i].sh_size;
593596 const char *name = secstrings + sechdrs[i].sh_name +
594597 strlen(".rela");
595598 /* We want to process only relocation sections and not .init */
596599 if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA))
597600 continue;
598− Elf_Rela *rela;
599− Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset;
600− Elf_Rela *stop = (void*)start + sechdrs[i].sh_size;
601601
602602 for (rela = start; rela < stop; rela++) {
603603 Elf_Rela r;