* [2.5 bk current] Compile error in module.c
@ 2002-11-12 16:00 Paul Larson
2002-11-12 17:44 ` Rusty Russell
0 siblings, 1 reply; 4+ messages in thread
From: Paul Larson @ 2002-11-12 16:00 UTC (permalink / raw)
To: rusty; +Cc: lkml
[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]
The ltp nightly run last night failed to compile with the following
errors:
gcc -Wp,-MD,kernel/.module.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=module -DKBUILD_MODNAME=module -DEXPORT_SYMTAB -c -o
kernel/module.o kernel/module.c
In file included from kernel/module.c:19:
include/linux/module.h:239: warning: `symbol_put' redefined
include/linux/module.h:57: warning: this is the location of the previous
definition
kernel/module.c:555: parse error before `do'
kernel/module.c:560: parse error before `do'
kernel/module.c:560: parse error before `&'
kernel/module.c:560: warning: type defaults to `int' in declaration of
`_raw_spin_lock'
kernel/module.c:560: warning: function declaration isn't a prototype
kernel/module.c:560: conflicting types for `_raw_spin_lock'
include/asm/spinlock.h:117: previous declaration of `_raw_spin_lock'
kernel/module.c:560: warning: data definition has no type or storage
class
kernel/module.c:561: warning: type defaults to `int' in declaration of
`ks'
kernel/module.c:561: braced-group within expression allowed only inside
a function
kernel/module.c:575: `symbol_put_addr' undeclared here (not in a
function)
kernel/module.c:575: initializer element is not constant
kernel/module.c:575: (near initialization for
`__ksymtab_symbol_put_addr.value')gcc: Internal compiler error: program
cc1 got fatal signal 11
make[1]: *** [kernel/module.o] Error 1
make: *** [kernel] Error 2
jeep:/kernel/bk/linux-2.5# {standard input}: Assembler messages:
{standard input}:0: Warning: end of file not at end of a line; newline
inserted
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 240 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.5 bk current] Compile error in module.c
2002-11-12 16:00 [2.5 bk current] Compile error in module.c Paul Larson
@ 2002-11-12 17:44 ` Rusty Russell
2002-11-12 18:02 ` Paul Larson
2002-11-12 20:00 ` Ed Lloyd-Davies
0 siblings, 2 replies; 4+ messages in thread
From: Rusty Russell @ 2002-11-12 17:44 UTC (permalink / raw)
To: Paul Larson; +Cc: lkml
In message <1037116812.10626.6.camel@plars> you write:
>
> --=-zCH6+R6ao/F8Ph/vicXT
> Content-Type: text/plain
> Content-Transfer-Encoding: quoted-printable
>
> The ltp nightly run last night failed to compile with the following
> errors:
Yep. How does this go for you?
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
--- working-2.5.47-module-alias/kernel/module.c.~1~ 2002-11-12 22:10:43.000000000 +1100
+++ working-2.5.47-module-alias/kernel/module.c 2002-11-13 04:22:47.000000000 +1100
@@ -492,6 +492,28 @@ void __symbol_put(const char *symbol)
}
EXPORT_SYMBOL(__symbol_put);
+void symbol_put_addr(void *addr)
+{
+ struct kernel_symbol_group *ks;
+ unsigned long flags;
+
+ spin_lock_irqsave(&modlist_lock, flags);
+ list_for_each_entry(ks, &symbols, list) {
+ unsigned int i;
+
+ for (i = 0; i < ks->num_syms; i++) {
+ if (ks->syms[i].value == (unsigned long)addr) {
+ module_put(ks->owner);
+ spin_unlock_irqrestore(&modlist_lock, flags);
+ return;
+ }
+ }
+ }
+ spin_unlock_irqrestore(&modlist_lock, flags);
+ BUG();
+}
+EXPORT_SYMBOL_GPL(symbol_put_addr);
+
#else /* !CONFIG_MODULE_UNLOAD */
static void print_unload_info(struct seq_file *m, struct module *mod)
{
@@ -716,28 +738,6 @@ void *__symbol_get(const char *symbol)
}
EXPORT_SYMBOL_GPL(__symbol_get);
-void symbol_put_addr(void *addr)
-{
- struct kernel_symbol_group *ks;
- unsigned long flags;
-
- spin_lock_irqsave(&modlist_lock, flags);
- list_for_each_entry(ks, &symbols, list) {
- unsigned int i;
-
- for (i = 0; i < ks->num_syms; i++) {
- if (ks->syms[i].value == (unsigned long)addr) {
- module_put(ks->owner);
- spin_unlock_irqrestore(&modlist_lock, flags);
- return;
- }
- }
- }
- spin_unlock_irqrestore(&modlist_lock, flags);
- BUG();
-}
-EXPORT_SYMBOL_GPL(symbol_put_addr);
-
/* Transfer one ELF section to the correct (init or core) area. */
static void *copy_section(const char *name,
void *base,
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.5.47-module-alias/crypto/api.c working-2.5.47-modname/crypto/api.c
--- working-2.5.47-module-alias/crypto/api.c 2002-11-11 20:00:55.000000000 +1100
+++ working-2.5.47-modname/crypto/api.c 2002-11-13 04:30:48.000000000 +1100
@@ -263,8 +263,7 @@ static int c_show(struct seq_file *m, vo
struct crypto_alg *alg = (struct crypto_alg *)p;
seq_printf(m, "name : %s\n", alg->cra_name);
- seq_printf(m, "module : %s\n", alg->cra_module ?
- alg->cra_module->name : "[static]");
+ seq_printf(m, "module : %s\n", module_name(alg->cra_module));
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal working-2.5.47-module-alias/include/linux/module.h working-2.5.47-modname/include/linux/module.h
--- working-2.5.47-module-alias/include/linux/module.h 2002-11-12 22:43:55.000000000 +1100
+++ working-2.5.47-modname/include/linux/module.h 2002-11-13 04:41:29.000000000 +1100
@@ -288,11 +288,18 @@ static inline int try_module_get(struct
static inline void module_put(struct module *module)
{
}
-#define symbol_put(x) do { } while(0)
+#define __symbol_put(x) do { } while(0)
#define symbol_put_addr(p) do { } while(0)
#endif /* CONFIG_MODULE_UNLOAD */
+static inline char *module_name(struct module *module)
+{
+ if (module)
+ return module->name;
+ return "[built-in]";
+}
+
#define __unsafe(mod) \
do { \
if (mod && !(mod)->unsafe) { \
@@ -315,6 +322,10 @@ do { \
#define try_module_get(module) 1
#define module_put(module) do { } while(0)
+static inline char *module_name(struct module *module)
+{
+ return "[built-in]";
+}
#define __unsafe(mod)
#endif /* CONFIG_MODULES */
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.5 bk current] Compile error in module.c
2002-11-12 17:44 ` Rusty Russell
@ 2002-11-12 18:02 ` Paul Larson
2002-11-12 20:00 ` Ed Lloyd-Davies
1 sibling, 0 replies; 4+ messages in thread
From: Paul Larson @ 2002-11-12 18:02 UTC (permalink / raw)
To: Rusty Russell; +Cc: lkml
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On Tue, 2002-11-12 at 11:44, Rusty Russell wrote:
> In message <1037116812.10626.6.camel@plars> you write:
> >
> > --=-zCH6+R6ao/F8Ph/vicXT
> > Content-Type: text/plain
> > Content-Transfer-Encoding: quoted-printable
> >
> > The ltp nightly run last night failed to compile with the following
> > errors:
>
> Yep. How does this go for you?
>
> Rusty.
Oops, I sent that last note before my mail updated with the new one you
sent me. The one you sent me with more in it fixed it all up.
Thanks,
Paul Larson
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 240 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [2.5 bk current] Compile error in module.c
2002-11-12 17:44 ` Rusty Russell
2002-11-12 18:02 ` Paul Larson
@ 2002-11-12 20:00 ` Ed Lloyd-Davies
1 sibling, 0 replies; 4+ messages in thread
From: Ed Lloyd-Davies @ 2002-11-12 20:00 UTC (permalink / raw)
To: Rusty Russell; +Cc: lkml
On Wed, 13 Nov 2002, Rusty Russell wrote:
> Yep. How does this go for you?
This works for me on 2.5.47-bk1 too. That's the first time I
have got a kernel to compile since 2.5.44 ;) Thanks.
Cheers,
Ed
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-11-12 19:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-12 16:00 [2.5 bk current] Compile error in module.c Paul Larson
2002-11-12 17:44 ` Rusty Russell
2002-11-12 18:02 ` Paul Larson
2002-11-12 20:00 ` Ed Lloyd-Davies
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox