From: Grant Grundler <grundler@parisc-linux.org>
To: parisc-linux@lists.parisc-linux.org
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [parisc-linux] IDE modules build prob
Date: Sat, 5 Jul 2003 23:57:54 -0600 [thread overview]
Message-ID: <20030706055754.GA18646@dsl2.external.hp.com> (raw)
In-Reply-To: <20030705230834.GB9682@dsl2.external.hp.com>
On Sat, Jul 05, 2003 at 05:08:34PM -0600, Grant Grundler wrote:
> 2) CONFIG_IDE=m leads to lots of unresolved symbols in IDE modules.
> Willy just pointed me at
>
> http://www.ussg.iu.edu/hypermail/linux/kernel/0307.0/0995.html
>
> which should solve this problem.
Alan Cox's "it's a start" patch has problems when applied
to our 2.4.21 tree (diff appended):
...
ld -r -o ide-core.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o
ide-default.o ide-proc.o setup-pci.o ide-dma.o
ide-default.o(.text.idedefault_init+0x0): In function `init_module':
: multiple definition of `init_module'
ide.o(.text.init_module+0x0): first defined here
make[2]: *** [ide-core.o] Error 1
make[2]: Leaving directory `/home/src/linux/drivers/ide'
...
grundler <507>fgrep module_init *c
...
ide-default.c:module_init(idedefault_init);
...
ide.c:module_init(ide_init);
...
grundler <508>
I gather each .o file is only allowed to have one module_init().
If that a deficiency in parisc build or something else?
thanks,
grant
Index: drivers/ide/Makefile
===================================================================
RCS file: /var/cvs/linux/drivers/ide/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- drivers/ide/Makefile 26 Jun 2003 15:07:16 -0000 1.11
+++ drivers/ide/Makefile 6 Jul 2003 05:53:08 -0000
@@ -8,7 +8,6 @@
# In the future, some of these should be built conditionally.
#
-O_TARGET := idedriver.o
export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-dma.o ide-lib.o setup-pci.o ide-io.o ide-disk.o
@@ -29,24 +28,23 @@ endif
# Core IDE code - must come before legacy
-obj-$(CONFIG_BLK_DEV_IDE) += ide-probe.o ide-geometry.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o ide-default.o
-obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
-obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
-obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
-obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
+ide-core-objs := ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o ide-default.o ide-proc.o
+ide-detect-objs := ide-probe.o ide-geometry.o
ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
-obj-$(CONFIG_BLK_DEV_IDE) += setup-pci.o
+ide-core-objs += setup-pci.o
endif
ifeq ($(CONFIG_BLK_DEV_IDEDMA_PCI),y)
-obj-$(CONFIG_BLK_DEV_IDE) += ide-dma.o
+ide-core-objs += ide-dma.o
endif
-obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
-
-ifeq ($(CONFIG_BLK_DEV_IDE),y)
-obj-$(CONFIG_PROC_FS) += ide-proc.o
-endif
+# Initialisation order:
+# Core sets up
+# Legacy drivers may register a callback
+# Drivers are pre initialised
+# Probe inits the drivers and driver callbacks
+# Raid scans the devices
+obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o
ifeq ($(CONFIG_BLK_DEV_IDE),y)
obj-y += legacy/idedriver-legacy.o
@@ -58,10 +56,28 @@ else
endif
endif
+obj-$(CONFIG_BLK_DEV_ISAPNP) += ide-pnp.o
+
+obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
+obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
+obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
+obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
+
+obj-$(CONFIG_BLK_DEV_IDE) += ide-detect.o
ifeq ($(CONFIG_BLK_DEV_IDE),y)
# RAID must be last of all
obj-y += raid/idedriver-raid.o
endif
+list-multi := ide-core.o ide-detect.o
+O_TARGET := idedriver.o
+
include $(TOPDIR)/Rules.make
+
+ide-core.o: $(ide-core-objs)
+ $(LD) -r -o $@ $(ide-core-objs)
+
+ide-detect.o: $(ide-detect-objs)
+ $(LD) -r -o $@ $(ide-detect-objs)
+
next prev parent reply other threads:[~2003-07-06 5:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20030627151546.GA30607@dsl2.external.hp.com>
[not found] ` <3ED70CF10000AE2E@ocpmta2.freegates.net>
2003-06-27 16:54 ` [parisc-linux] warning: minor abi change Grant Grundler
2003-06-28 10:48 ` Joel Soete
2003-07-05 23:08 ` Grant Grundler
2003-07-05 23:53 ` John David Anglin
2003-07-06 4:12 ` Grant Grundler
2003-07-06 16:12 ` Joel Soete
2003-07-07 20:02 ` Carlos O'Donell
2003-07-07 20:19 ` John David Anglin
2003-07-08 1:45 ` Carlos O'Donell
2003-07-06 5:57 ` Grant Grundler [this message]
2003-07-06 6:31 ` [parisc-linux] IDE modules build prob Grant Grundler
2003-07-06 7:23 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030706055754.GA18646@dsl2.external.hp.com \
--to=grundler@parisc-linux.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox