[lkml]   [2001]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] link failur in Linux 2.4.9-ac16 around apm.o and sysrq.o
2.4.9-ac16 fails to link with CONFIG_APM=y and
CONFIG_MAGIC_SYSRQ=n. This is because apm.c unconditionally
makes calls to functions (__sysrq_lock_table and friends)
defined in sysrq.c.

I can think of a couple of different approaches to work this
around, but is there an established proper way to resolve this
kind of dependency in the kernel code?

I've attached a fix based on (3) below at the end of this message.

(1) In include/linux/sysrq.h, define stubs for
__sysrq_lock_table that does not do anything when

(2) Change ''make config'' procedure so that CONFIG_MAGIC_SYSRQ
is always set if CONFIG_APM is defined;

(3) Change drivers/char/Makefile to make sysrq.o to be linked
in if CONFIG_APM is defined (even if CONFIG_MAGIC_SYSRQ is).

--- 2.4.9-ac16.sffix/drivers/char/Makefile Thu Sep 27 12:46:56 2001
+++ 2.4.9-ac16.sffix/drivers/char/Makefile Thu Sep 27 22:08:19 2001
@@ -143,6 +143,7 @@

obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o
+obj-$(CONFIG_APM) += sysrq.o
obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o
obj-$(CONFIG_ROCKETPORT) += rocket.o
obj-$(CONFIG_MOXA_SMARTIO) += mxser.o
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-03-22 13:03    [W:0.072 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site