Преглед на файлове

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.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
akpm@osdl.org преди 20 години
родител
ревизия
fededcd2af
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      scripts/mod/modpost.c

+ 3 - 3
scripts/mod/modpost.c

@@ -590,14 +590,14 @@ static void check_sec_ref(struct module *mod, const char *modname,
 		
 		
 	/* Walk through all sections */
 	/* Walk through all sections */
 	for (i = 0; i < hdr->e_shnum; i++) {
 	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 +
 		const char *name = secstrings + sechdrs[i].sh_name +
 						strlen(".rela");
 						strlen(".rela");
 		/* We want to process only relocation sections and not .init */
 		/* We want to process only relocation sections and not .init */
 		if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA))
 		if (section_ref_ok(name) || (sechdrs[i].sh_type != SHT_RELA))
 			continue;
 			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++) {
 		for (rela = start; rela < stop; rela++) {
 			Elf_Rela r;
 			Elf_Rela r;