mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] Fix .text.exit error with static compile of synclinkmp.c
@ 2002-09-05 17:36 Adrian Bunk
  2002-09-05 17:43 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2002-09-05 17:36 UTC (permalink / raw)
  To: Marcelo Tosatti, paulkf; +Cc: linux-kernel

Hi,

when compiling synclinkmp.c statically into the kernel the following error
occurs at the final linking (this is 2.4.20-pre5-ac2 but the problem also
exists in 2.4.20-pre5):

<--  snip  -->

...
        --end-group \
        -o vmlinux
drivers/char/char.o(.data+0x81b4): undefined reference to `local symbols
in discarded section .text.exit'
make: *** [vmlinux] Error 1

<--  snip  -->

The problem is that the __exit function synclinkmp_remove_one is referred
to in "static struct pci_driver synclinkmp_pci_driver".

The fix is simple:

--- drivers/char/synclinkmp.c.old	2002-09-05 12:40:25.000000000 +0200
+++ drivers/char/synclinkmp.c	2002-09-05 12:42:34.000000000 +0200
@@ -519,7 +519,9 @@
 	name:		"synclinkmp",
 	id_table:	synclinkmp_pci_tbl,
 	probe:		synclinkmp_init_one,
+#ifdef MODULE
 	remove:		synclinkmp_remove_one,
+#endif
 };



cu
Adrian

-- 

You only think this is a free country. Like the US the UK spends a lot of
time explaining its a free country because its a police state.
								Alan Cox


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-05 20:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-05 17:36 [patch] Fix .text.exit error with static compile of synclinkmp.c Adrian Bunk
2002-09-05 17:43 ` Christoph Hellwig
2002-09-05 20:11   ` Adrian Bunk
2002-09-05 20:15     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®