/[linux-patches]/genpatches-2.6/trunk/2.6.13-pre/1370_sparc-modpost_stt_reg.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.13-pre/1370_sparc-modpost_stt_reg.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 93 - (show annotations) (download)
Wed Jul 13 12:59:32 2005 UTC (9 years, 5 months ago) by dsd
File size: 2355 byte(s)
Creating 2.6.13-pre branch from 2.6.12
1 To: "linux-kernel@vger.kernel.orgdavem"@davemloft.net, sparclinux@vger.kernel.org
2 Subject: [PATCH] modpost needs to cope with new glibc elf header on sparc
3 Date: Wed, 13 Jul 2005 08:21:34 +0200 (CEST)
4 From: fabbione@fabbione.net (Fabio Massimo Di Nitto)
5
6 Hi everybody,
7 recently a change in the glibc elf.h header has been introduced causing
8 modpost to spawn tons of warnings (like the one below) building the kernel on sparc:
9
10 [SNIP]
11 *** Warning: "current_thread_info_reg" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
12 *** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
13 *** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
14 [SNIP]
15
16 Ben Collins discovered that the STT_REGISTERED did change and that this change
17 needs to be propagated to modpost.
18
19 -#define STT_REGISTER 13 /* Global register reserved to app. */
20 +#define STT_SPARC_REGISTER 13 /* Global register reserved to app. */
21
22 I did and tested this simple patch to maintain compatibility with newer (>= 2.3.4)
23 and older (<= 2.3.2) glibc.
24
25 Please apply.
26
27 Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
28
29 Cheers
30 Fabio
31
32 diff -urNad --exclude=CVS --exclude=.svn ./scripts/mod/modpost.c /usr/src/dpatchtemp/dpep-work.EcxGXN/linux-source-2.6.12-2.6.12/scripts/mod/modpost.c
33 --- ./scripts/mod/modpost.c 2005-06-17 21:48:29.000000000 +0200
34 +++ /usr/src/dpatchtemp/dpep-work.EcxGXN/linux-source-2.6.12-2.6.12/scripts/mod/modpost.c 2005-06-30 09:29:54.000000000 +0200
35 @@ -359,11 +359,16 @@
36 /* ignore __this_module, it will be resolved shortly */
37 if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0)
38 break;
39 -#ifdef STT_REGISTER
40 +/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */
41 +#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER)
42 +/* add compatibility with older glibc */
43 +#ifndef STT_SPARC_REGISTER
44 +#define STT_SPARC_REGISTER STT_REGISTER
45 +#endif
46 if (info->hdr->e_machine == EM_SPARC ||
47 info->hdr->e_machine == EM_SPARCV9) {
48 /* Ignore register directives. */
49 - if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER)
50 + if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
51 break;
52 }
53 #endif
54 -
55 To unsubscribe from this list: send the line "unsubscribe sparclinux" in
56 the body of a message to majordomo@vger.kernel.org
57 More majordomo info at http://vger.kernel.org/majordomo-info.html

  ViewVC Help
Powered by ViewVC 1.1.20