Skip to contentSkip to conversation

2.4.18-pre1 sound/trident fix with newer binutils

PATCH In review Albert Cranford 2 participants 2 messages Jan 2, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.18-pre1 sound/trident fix with newer binutils

Hello Ollie,
Small problem.
I cannot build kernel with binutils-2.11.92.0.12.3

Using ARCH='i386' AS='as' LD='ld' CC='/usr/bin/gcc' CPP='/usr/bin/gcc -E' AR='ar' HOSTAS='as' HOSTLD='gcc' HOSTCC='gcc' HOSTAR='ar' drivers/sound/trident.o(.data+0x154): undefined reference to `local symbols in discarded section .text.exit'

Please submit the attached patch to Marcelo and Linus for 2.4 and 2.5 respectfully. This patch also works with older binutils-2.11.2
Thanks,
Albert

drivers/sound/trident.c Mon Dec 31 16:32:44 2001 renamed from drivers/sound/trident.c.orig Mon Dec 31 16:32:25 2001 +4 -2
@@ -4141,7 +4141,7 @@
        goto out;
 }
 
-static void __exit trident_remove(struct pci_dev *pci_dev)
+static void __devexit trident_remove(struct pci_dev *pci_dev)
 {
        int i;
        struct trident_card *card = pci_get_drvdata(pci_dev);
@@ -4194,7 +4194,9 @@
        name:           TRIDENT_MODULE_NAME,
        id_table:       trident_pci_tbl,
        probe:          trident_probe,
+#ifdef DEVEXIT_LINKED
        remove:         trident_remove,
+#endif
        suspend:        trident_suspend,
        resume:         trident_resume
 };
@@ -4214,7 +4216,7 @@
        return 0;
 }
 
-static void __exit trident_cleanup_module (void)
+static void __devexit trident_cleanup_module (void)
 {
        pci_unregister_driver(&trident_pci_driver);
 }
Signature · 2 lines
Albert Cranford Deerfield Beach FL USA
[email protected]
#1 lore raw

drivers/sound/trident.c Mon Dec 31 16:32:44 2001 line 4199

Quoted 8 lines · Albert Cranford

Hello Ollie,
Small problem.
I cannot build kernel with binutils-2.11.92.0.12.3

drivers/sound/trident.o(.data+0x154): undefined reference to `local symbols in discarded section .text.exit'

drivers/sound/trident.c Mon Dec 31 16:32:44 2001 renamed from drivers/sound/trident.c.orig Mon Dec 31 16:32:25 2001 +2 -0
+#ifdef DEVEXIT_LINKED
       remove:         trident_remove,
+#endif

What is DEVEXIT_LINKED? The correct form is

	remove:		__devexit_p(trident_remove),