Re: Undefined Symbols in 2.1.30

Bernhard Kaindl (bkaindl@netway.at)
Wed, 2 Apr 1997 11:45:32 +0200 (MEST)


On Tue, 1 Apr 1997, Richard Ketchersid wrote:
> following symbols being undefined:
> Symbol: Defined in:
> __global_cli linux/arch/i386/kernel/irq.c
> __global_restore_flags ""
> __global_save_flags ""
> __global_sti ""
> global_irq_holder linux/arch/i386/kernel/irq.c
> local_irq_count linux/arch/i386/kernel/irq.c
> tqueue_lock linux/kernel/sched.c
> waitqueue_lock linux/kernel/sched.c

Things may change, but I've made a patch from my lookings at the
(header)-files:

diff -u1 kernel/ksyms.c.old kernel/ksyms.c
--- kernel/ksyms.c.old Wed Apr 2 11:13:06 1997
+++ kernel/ksyms.c Wed Apr 2 11:17:08 1997
@@ -241,2 +241,4 @@
/* interrupt handling */
+EXPORT_SYMBOL(tqueue_lock);
+EXPORT_SYMBOL(waitqueue_lock);
EXPORT_SYMBOL(request_irq);
diff -u1 arch/i386/kernel/i386_ksyms.c.orig arch/i386/kernel/i386_ksyms.c
--- arch/i386/kernel/i386_ksyms.c.orig Wed Apr 2 11:06:13 1997
+++ arch/i386/kernel/i386_ksyms.c Wed Apr 2 11:11:39 1997
@@ -9,2 +9,3 @@

+#include <asm/hardirq.h>
#include <asm/semaphore.h>
@@ -20,2 +21,3 @@
/* platform dependent support */
+EXPORT_SYMBOL(local_irq_count);
EXPORT_SYMBOL(EISA_bus);
@@ -36,2 +38,7 @@
#ifdef __SMP__
+EXPORT_SYMBOL(__global_cli);
+EXPORT_SYMBOL(__global_sti);
+EXPORT_SYMBOL(__global_save_flags);
+EXPORT_SYMBOL(__global_restore_flags);
+EXPORT_SYMBOL(global_irq_holder);
EXPORT_SYMBOL(apic_reg); /* Needed internally for the I386 inlines */

Note that you must delete kernel/ksyms.o arch/i386/kernel/i386_ksyms.o
before doing a make install without a make clean. I've figured out that
ksyms.c is not considered by make to be a dependent of ksyms.o because
it's not in O_OBJ but in OX_OBJ. I've used this patch correct this for me:

--- kernel/Makefile.old Wed Apr 2 10:37:16 1997
+++ kernel/Makefile Wed Apr 2 11:32:06 1997
@@ -22,4 +22,6 @@
include $(TOPDIR)/Rules.make

+ksyms.o: ksyms.c
+
sched.o: sched.c
$(CC) $(CFLAGS) $(PROFILING) -fno-omit-frame-pointer -c $<
--- arch/i386/kernel/Makefile.orig Wed Apr 2 11:33:51 1997
+++ arch/i386/kernel/Makefile Wed Apr 2 11:36:28 1997
@@ -23,2 +23,3 @@
OX_OBJS := i386_ksyms.o
+i386_ksyms.o: i386_ksyms.c

Not very nice nor a general fix, but small changes.

I hope the patches work and

have a good time with linux,

Bernhard Kaindl