Skip to content

Commit

Permalink
kbuild: fix modpost compile with older gcc
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
[email protected] authored and Sam Ravnborg committed Feb 22, 2006
1 parent 0f558c3 commit fededcd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,14 +590,14 @@ static void check_sec_ref(struct module *mod, const char *modname,

/* Walk through all sections */
for (i = 0; i < hdr->e_shnum; i++) {
Elf_Rela *rela;
Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset;
Elf_Rela *stop = (void*)start + sechdrs[i].sh_size;
const char *name = secstrings + sechdrs[i].sh_name +
strlen(".rela");
/* We want to process only relocation sections and not .init */
if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA))
continue;
Elf_Rela *rela;
Elf_Rela *start = (void *)hdr + sechdrs[i].sh_offset;
Elf_Rela *stop = (void*)start + sechdrs[i].sh_size;

for (rela = start; rela < stop; rela++) {
Elf_Rela r;
Expand Down

0 comments on commit fededcd

Please sign in to comment.