[lkml]   [2002]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch] Fix .text.exit error with static compile of synclinkmp.c

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,



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

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:28    [W:0.035 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site