SOURCES (LINUX_2_6): linux-2.6-modpost_new-sparc-elf-header.patch ...

pluto pluto at pld-linux.org
Mon Aug 1 12:35:24 CEST 2005


Author: pluto                        Date: Mon Aug  1 10:35:23 2005 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- kill bogus modpost warnings.

---- Files affected:
SOURCES:
   linux-2.6-modpost_new-sparc-elf-header.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-modpost_new-sparc-elf-header.patch
diff -u /dev/null SOURCES/linux-2.6-modpost_new-sparc-elf-header.patch:1.1.2.1
--- /dev/null	Mon Aug  1 12:35:24 2005
+++ SOURCES/linux-2.6-modpost_new-sparc-elf-header.patch	Mon Aug  1 12:35:18 2005
@@ -0,0 +1,53 @@
+From fabbione at fabbione.net Wed Jul 13 08:25:49 2005
+To: davem at davemloft.net,
+Subject: [PATCH] modpost needs to cope with new glibc elf header on sparc
+Date:	Wed, 13 Jul 2005 08:25:49 +0200 (CEST)
+
+Hi everybody,
+
+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 did change and that this change
+needs to be propagated to modpost.
+
+-#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.
+
+Please apply.
+
+Signed-off-by: Fabio M. Di Nitto <fabbione at fabbione.net>
+
+Cheers
+Fabio
+
+--- a/scripts/mod/modpost.c	2005-06-17 21:48:29.000000000 +0200
++++ b/scripts/mod/modpost.c	2005-06-30 09:29:54.000000000 +0200
+@@ -359,11 +359,16 @@
+ 		/* ignore __this_module, it will be resolved shortly */
+ 		if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
+ 			break;
+-#ifdef STT_REGISTER
++/* 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 */
++#ifndef STT_SPARC_REGISTER
++#define STT_SPARC_REGISTER STT_REGISTER
++#endif
+ 		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)
+ 				break;
+ 		}
+ #endif
================================================================



More information about the pld-cvs-commit mailing list