RE: Link error with linux-2.5 bk

From: Luck, Tony <tony.luck_at_intel.com>
Date: 2004-01-22 03:55:19
>   LD      .tmp_vmlinux1
> local symbol 0: discarded in section `.exit.text' from drivers/built-in.o

My money is on this change to drivers/net/dummy.c (clipped from diff
between bk3 and bk4 trees).  "dummy_free_one()" is marked as __exit (so
we'll try to discard it), but it is called by dummy_init_module().

Dropping the "__exit" will fix it (but there may be other fixes).  Copying
Andi Kleen, as according to BitKeeper he appears to be the author of this
change.


-Tony



+static void __exit dummy_free_one(int index) 
+{
+	unregister_netdev(dummies[index]);
+	free_netdev(dummies[index]);
+} 
+
+static int __init dummy_init_module(void)
+{ 
+	int i, err = 0;
+	dummies = kmalloc(numdummies * sizeof(void *), GFP_KERNEL); 
+	if (!dummies)
+		return -ENOMEM; 
+	for (i = 0; i < numdummies && !err; i++)
+		err = dummy_init_one(i); 
+	if (err) { 
+		while (--i >= 0)
+			dummy_free_one(i);
+	}
+	return err;
+} 
+

-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Jan 21 12:01:12 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:21 EST