tree 480fc54b0cbbe95ba34b87ae9bf1801d85a5164c
parent 6d983feab80948cdd0e3920c40d453a6436eeb23
author Fabio Massimo Di Nitto <[EMAIL PROTECTED]> Wed, 13 Jul 2005 08:25:49 
committer Sam Ravnborg <[EMAIL PROTECTED](none)> Wed, 13 Jul 2005 17:05:32 +0000

[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:

*** Warning: "current_thread_info_reg" [net/sunrpc/auth_gss/auth_rpcgss.ko] 
*** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
*** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!

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 (>= 
and older (<= 2.3.2) glibc.

Signed-off-by: Fabio M. Di Nitto <[EMAIL PROTECTED]>
Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]>

 scripts/mod/modpost.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -359,11 +359,16 @@ handle_modversions(struct module *mod, s
                /* ignore __this_module, it will be resolved shortly */
                if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
+/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
+#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
+/* add compatibility with older glibc */
                if (info->hdr->e_machine == EM_SPARC ||
                    info->hdr->e_machine == EM_SPARCV9) {
                        /* Ignore register directives. */
-                       if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
+                       if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to