* [PATCH] modpost needs to cope with new glibc elf header on sparc (resend - my MTA did eat the previous one apparently)
@ 2005-07-13 6:25 Fabio Massimo Di Nitto
2005-07-13 17:06 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Massimo Di Nitto @ 2005-07-13 6:25 UTC (permalink / raw)
To: davem, linux-kernel, sparclinux
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@fabbione.net>
Cheers
Fabio
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
--- ./scripts/mod/modpost.c 2005-06-17 21:48:29.000000000 +0200
+++ /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
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] modpost needs to cope with new glibc elf header on sparc (resend - my MTA did eat the previous one apparently)
2005-07-13 6:25 [PATCH] modpost needs to cope with new glibc elf header on sparc (resend - my MTA did eat the previous one apparently) Fabio Massimo Di Nitto
@ 2005-07-13 17:06 ` Sam Ravnborg
2005-07-13 19:20 ` Fabio Massimo Di Nitto
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2005-07-13 17:06 UTC (permalink / raw)
To: Fabio Massimo Di Nitto; +Cc: davem, linux-kernel, sparclinux
> 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:
>
Applied.
You need to reread SubmittingPatches:
> 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
> --- ./scripts/mod/modpost.c 2005-06-17 21:48:29.000000000 +0200
> +++ /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
This does not apply with patch -p1. I fixed it manually.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] modpost needs to cope with new glibc elf header on sparc (resend - my MTA did eat the previous one apparently)
2005-07-13 17:06 ` Sam Ravnborg
@ 2005-07-13 19:20 ` Fabio Massimo Di Nitto
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Massimo Di Nitto @ 2005-07-13 19:20 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: davem, linux-kernel, sparclinux
Sam Ravnborg wrote:
>>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:
>>
>
> Applied.
>
Thanks
> You need to reread SubmittingPatches:
I will..
>
>>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
>>--- ./scripts/mod/modpost.c 2005-06-17 21:48:29.000000000 +0200
>>+++ /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
>
>
> This does not apply with patch -p1. I fixed it manually.
.. but it does here...
fabbione@gordian:/usr/src/wartydevel/kernel/breezy/linux-source-2.6.12-2.6.12$ patch -p1 <
debian/patches/scripts-mod-modpost_deal-with-new-glibc.dpatch
patching file scripts/mod/modpost.c
fabbione@gordian:/usr/src/wartydevel/kernel/breezy/linux-source-2.6.12-2.6.12$ patch -Rp1 <
debian/patches/scripts-mod-modpost_deal-with-new-glibc.dpatch
patching file scripts/mod/modpost.c
fabbione@gordian:/usr/src/wartydevel/kernel/breezy/linux-source-2.6.12-2.6.12$
Thanks a lot.
Fabio
--
no signature file found.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-13 19:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-13 6:25 [PATCH] modpost needs to cope with new glibc elf header on sparc (resend - my MTA did eat the previous one apparently) Fabio Massimo Di Nitto
2005-07-13 17:06 ` Sam Ravnborg
2005-07-13 19:20 ` Fabio Massimo Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox