aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Massimo Di Nitto <fabbione@fabbione.net>2005-07-13 02:25:49 -0400
committerSam Ravnborg <sam@mars.(none)>2005-07-13 13:05:32 -0400
commitb95d4fec89c1f503ebad4c704ac08c3c6761329b (patch)
tree480fc54b0cbbe95ba34b87ae9bf1801d85a5164c
parent6d983feab80948cdd0e3920c40d453a6436eeb23 (diff)
[PATCH] kbuild: modpost needs to cope with new glibc elf header on sparc
Recently a change in the glibc elf.h header has been introduced causing modpost to spawn tons of warnings (like the one below) building the kernel on sparc: [SNIP] *** Warning: "current_thread_info_reg" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined! *** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined! *** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined! [SNIP] Ben Collins discovered that the STT_REGISTERED definition in glibc did change and that this change needs to be propagated to modpost. glibc change: -#define STT_REGISTER 13 /* Global register reserved to app. */ +#define STT_SPARC_REGISTER 13 /* Global register reserved to app. */ I did and tested this simple patch to maintain compatibility with newer (>= 2.3.4) and older (<= 2.3.2) glibc. Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--scripts/mod/modpost.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 9b9f94c915d2..09ffca54b373 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -359,11 +359,16 @@ handle_modversions(struct module *mod, struct elf_info *info,
359 /* ignore __this_module, it will be resolved shortly */ 359 /* ignore __this_module, it will be resolved shortly */
360 if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) 360 if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
361 break; 361 break;
362#ifdef STT_REGISTER 362/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
363#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
364/* add compatibility with older glibc */
365#ifndef STT_SPARC_REGISTER
366#define STT_SPARC_REGISTER STT_REGISTER
367#endif
363 if (info->hdr->e_machine == EM_SPARC || 368 if (info->hdr->e_machine == EM_SPARC ||
364 info->hdr->e_machine == EM_SPARCV9) { 369 info->hdr->e_machine == EM_SPARCV9) {
365 /* Ignore register directives. */ 370 /* Ignore register directives. */
366 if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER) 371 if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
367 break; 372 break;
368 } 373 }
369#endif 374#endif