linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference to `sys_nfsservctl'
@ 2002-03-16  8:02 Miles Lane
  2002-03-16  8:53 ` Alexander Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Miles Lane @ 2002-03-16  8:02 UTC (permalink / raw)
  To: LKML

arch/i386/kernel/kernel.o: In function `sys_call_table':
arch/i386/kernel/kernel.o(.data+0x300): undefined reference to
`sys_nfsservctl'

CONFIG_PACKET=m
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK_DEV=y
# CONFIG_NETFILTER is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_INET_ECN is not set
CONFIG_SYN_COOKIES=y
# CONFIG_IPV6 is not set
# CONFIG_KHTTPD is not set
# CONFIG_ATM is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_IPX is not set
CONFIG_ATALK=y
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_LLC is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_FASTROUTE is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# Network File Systems
#
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_NFS_FS is not set
# CONFIG_NFS_V3 is not set
# CONFIG_ROOT_NFS is not set
# CONFIG_NFSD is not set
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
# CONFIG_SUNRPC is not set
# CONFIG_LOCKD is not set
# CONFIG_SMB_FS is not set
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
CONFIG_ZISOFS_FS=y


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

* Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference to `sys_nfsservctl'
  2002-03-16  8:02 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference to `sys_nfsservctl' Miles Lane
@ 2002-03-16  8:53 ` Alexander Viro
  2002-03-16 10:16   ` [PATCH] " Alexander Viro
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Viro @ 2002-03-16  8:53 UTC (permalink / raw)
  To: Miles Lane; +Cc: Linus Torvalds, LKML



On 16 Mar 2002, Miles Lane wrote:

> arch/i386/kernel/kernel.o: In function `sys_call_table':
> arch/i386/kernel/kernel.o(.data+0x300): undefined reference to
> `sys_nfsservctl'

Fix: add a weak alias sys_nfsservctl -> sys_ni_syscall in kernel/sys.c.
While we are at it, the same can be done with sys_quotactl() - I suspect
that fs/noqout.c can be killed.

diff -urN C7-pre2/fs/noquot.c C7-pre2-current/fs/noquot.c
--- C7-pre2/fs/noquot.c	Fri May 12 14:21:20 2000
+++ C7-pre2-current/fs/noquot.c	Sat Mar 16 03:45:27 2002
@@ -2,14 +2,5 @@
  *           compiled into the kernel.
  */
 
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-
 int nr_dquots, nr_free_dquots;
 int max_dquots;
-
-asmlinkage long sys_quotactl(int cmd, const char *special, int id, caddr_t addr)
-{
-	return(-ENOSYS);
-}
diff -urN C7-pre2/kernel/sys.c C7-pre2-current/kernel/sys.c
--- C7-pre2/kernel/sys.c	Fri Mar 15 22:22:40 2002
+++ C7-pre2-current/kernel/sys.c	Sat Mar 16 03:43:14 2002
@@ -173,6 +173,11 @@
 	return -ENOSYS;
 }
 
+/* "Conditional" syscalls */
+
+asmlinkage long sys_nfsservctl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
+asmlinkage long sys_quotactl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
+
 static int proc_sel(struct task_struct *p, int which, int who)
 {
 	if(p->pid)


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

* [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference to `sys_nfsservctl'
  2002-03-16  8:53 ` Alexander Viro
@ 2002-03-16 10:16   ` Alexander Viro
  2002-03-16 17:39     ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Viro @ 2002-03-16 10:16 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML



On Sat, 16 Mar 2002, Alexander Viro wrote:

> On 16 Mar 2002, Miles Lane wrote:
> 
> > arch/i386/kernel/kernel.o: In function `sys_call_table':
> > arch/i386/kernel/kernel.o(.data+0x300): undefined reference to
> > `sys_nfsservctl'
> 
> Fix: add a weak alias sys_nfsservctl -> sys_ni_syscall in kernel/sys.c.
> While we are at it, the same can be done with sys_quotactl() - I suspect
> that fs/noqout.c can be killed.

It can.  Linus, what do you think about the following variant?

diff -urN C7-pre2/fs/Makefile C7-pre2-current/fs/Makefile
--- C7-pre2/fs/Makefile	Fri Mar 15 22:22:35 2002
+++ C7-pre2-current/fs/Makefile	Sat Mar 16 04:24:26 2002
@@ -16,12 +16,6 @@
 		dcache.o inode.o attr.o bad_inode.o file.o iobuf.o dnotify.o \
 		filesystems.o namespace.o seq_file.o xattr.o libfs.o
 
-ifeq ($(CONFIG_QUOTA),y)
-obj-y += dquot.o
-else
-obj-y += noquot.o
-endif
-
 ifneq ($(CONFIG_NFSD),n)
 ifneq ($(CONFIG_NFSD),)
 obj-y += nfsctl.o
@@ -84,6 +78,8 @@
 obj-y				+= binfmt_script.o
 
 obj-$(CONFIG_BINFMT_ELF)	+= binfmt_elf.o
+
+obj-$(CONFIG_QUOTA) += dquot.o
 
 # persistent filesystems
 obj-y += $(join $(subdir-y),$(subdir-y:%=/%.o))
diff -urN C7-pre2/fs/dquot.c C7-pre2-current/fs/dquot.c
--- C7-pre2/fs/dquot.c	Tue Feb 19 22:33:03 2002
+++ C7-pre2-current/fs/dquot.c	Sat Mar 16 04:45:14 2002
@@ -59,6 +59,7 @@
 #include <linux/tty.h>
 #include <linux/file.h>
 #include <linux/slab.h>
+#include <linux/sysctl.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
 
@@ -1240,9 +1241,22 @@
 	return ret;
 }
 
+static ctl_table fs_table[] = {
+	{FS_NRDQUOT, "dquot-nr", &nr_dquots, 2*sizeof(int),
+	 0444, NULL, &proc_dointvec},
+	{},
+};
+
+static ctl_table dquot_table[] = {
+	{CTL_FS, "fs", NULL, 0, 0555, fs_table},
+	{},
+};
+
 static int __init dquot_init(void)
 {
 	int i;
+
+	register_sysctl_table(dquot_table, 0);
 
 	for (i = 0; i < NR_DQHASH; i++)
 		INIT_LIST_HEAD(dquot_hash + i);
diff -urN C7-pre2/fs/noquot.c C7-pre2-current/fs/noquot.c
--- C7-pre2/fs/noquot.c	Fri May 12 14:21:20 2000
+++ C7-pre2-current/fs/noquot.c	Sat Mar 16 04:18:29 2002
@@ -2,14 +2,4 @@
  *           compiled into the kernel.
  */
 
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-
 int nr_dquots, nr_free_dquots;
-int max_dquots;
-
-asmlinkage long sys_quotactl(int cmd, const char *special, int id, caddr_t addr)
-{
-	return(-ENOSYS);
-}
diff -urN C7-pre2/include/linux/quota.h C7-pre2-current/include/linux/quota.h
--- C7-pre2/include/linux/quota.h	Mon Jan 14 23:13:52 2002
+++ C7-pre2-current/include/linux/quota.h	Sat Mar 16 04:23:01 2002
@@ -144,7 +144,6 @@
 
 #ifdef __KERNEL__
 
-extern int nr_dquots, nr_free_dquots;
 extern int dquot_root_squash;
 
 #define NR_DQHASH 43            /* Just an arbitrary number */
diff -urN C7-pre2/kernel/sys.c C7-pre2-current/kernel/sys.c
--- C7-pre2/kernel/sys.c	Fri Mar 15 22:22:40 2002
+++ C7-pre2-current/kernel/sys.c	Sat Mar 16 03:43:14 2002
@@ -173,6 +173,11 @@
 	return -ENOSYS;
 }
 
+/* "Conditional" syscalls */
+
+asmlinkage long sys_nfsservctl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
+asmlinkage long sys_quotactl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
+
 static int proc_sel(struct task_struct *p, int which, int who)
 {
 	if(p->pid)
diff -urN C7-pre2/kernel/sysctl.c C7-pre2-current/kernel/sysctl.c
--- C7-pre2/kernel/sysctl.c	Tue Feb 19 22:33:08 2002
+++ C7-pre2-current/kernel/sysctl.c	Sat Mar 16 04:22:45 2002
@@ -284,8 +284,6 @@
 	 0444, NULL, &proc_dointvec},
 	{FS_MAXFILE, "file-max", &files_stat.max_files, sizeof(int),
 	 0644, NULL, &proc_dointvec},
-	{FS_NRDQUOT, "dquot-nr", &nr_dquots, 2*sizeof(int),
-	 0444, NULL, &proc_dointvec},
 	{FS_DENTRY, "dentry-state", &dentry_stat, 6*sizeof(int),
 	 0444, NULL, &proc_dointvec},
 	{FS_OVERFLOWUID, "overflowuid", &fs_overflowuid, sizeof(int), 0644, NULL,


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

* Re: [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference
  2002-03-16 10:16   ` [PATCH] " Alexander Viro
@ 2002-03-16 17:39     ` Alan Cox
  2002-03-16 17:39       ` Alexander Viro
                         ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Alan Cox @ 2002-03-16 17:39 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Linus Torvalds, LKML

> +/* "Conditional" syscalls */
> +
> +asmlinkage long sys_nfsservctl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> +asmlinkage long sys_quotactl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> +

This is what Linus threw out before - when David wanted to use it to remove
all the intermodule crap.

It doesn't work with some architecture binutils

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

* Re: [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference
  2002-03-16 17:39     ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Alan Cox
@ 2002-03-16 17:39       ` Alexander Viro
  2002-03-16 18:01         ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined Alan Cox
  2002-03-16 18:15       ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Linus Torvalds
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Alexander Viro @ 2002-03-16 17:39 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linus Torvalds, LKML



On Sat, 16 Mar 2002, Alan Cox wrote:

> > +/* "Conditional" syscalls */
> > +
> > +asmlinkage long sys_nfsservctl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> > +asmlinkage long sys_quotactl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> > +
> 
> This is what Linus threw out before - when David wanted to use it to remove
> all the intermodule crap.
> 
> It doesn't work with some architecture binutils

Erm...  In this case we are within statatically linked image.  In which
situations it doesn't work?  AFAICS it's as straightforward use of weak
aliases as it gets...


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

* Re: [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined
  2002-03-16 17:39       ` Alexander Viro
@ 2002-03-16 18:01         ` Alan Cox
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Cox @ 2002-03-16 18:01 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Alan Cox, Linus Torvalds, LKML

> > This is what Linus threw out before - when David wanted to use it to remove
> > all the intermodule crap.
> > 
> > It doesn't work with some architecture binutils
> 
> Erm...  In this case we are within statatically linked image.  In which
> situations it doesn't work?  AFAICS it's as straightforward use of weak
> aliases as it gets...

Grepping I don't have the original mails on the subject

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

* Re: [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference
  2002-03-16 17:39     ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Alan Cox
  2002-03-16 17:39       ` Alexander Viro
@ 2002-03-16 18:15       ` Linus Torvalds
  2002-03-16 19:18       ` Daniel Jacobowitz
  2002-03-18  3:20       ` David S. Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2002-03-16 18:15 UTC (permalink / raw)
  To: Alan Cox; +Cc: Alexander Viro, LKML


On Sat, 16 Mar 2002, Alan Cox wrote:
> > +/* "Conditional" syscalls */
> > +
> > +asmlinkage long sys_nfsservctl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> > +asmlinkage long sys_quotactl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> > +
> 
> This is what Linus threw out before - when David wanted to use it to remove
> all the intermodule crap.
> 
> It doesn't work with some architecture binutils

How true is that these days, though? We are at the point where we don't
have to worry about COFF and a.out architectures (as far as the kernel is
concerned, of course - whatever binftm format is loaded in user mode is a
different thing). 

On a related tangent - maybe we should just get rid of SYMBOL_NAME etc 
crap? I don't think we've been able to compile a a.out kernel in about 5 
years or so, and that was the only thing that needed the magic prepended 
underscores etc?

			Linus


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

* Re: [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference
  2002-03-16 17:39     ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Alan Cox
  2002-03-16 17:39       ` Alexander Viro
  2002-03-16 18:15       ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Linus Torvalds
@ 2002-03-16 19:18       ` Daniel Jacobowitz
  2002-03-18  3:20       ` David S. Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2002-03-16 19:18 UTC (permalink / raw)
  To: Alan Cox; +Cc: Alexander Viro, Linus Torvalds, LKML

On Sat, Mar 16, 2002 at 05:39:03PM +0000, Alan Cox wrote:
> > +/* "Conditional" syscalls */
> > +
> > +asmlinkage long sys_nfsservctl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> > +asmlinkage long sys_quotactl(void) __attribute__ ((weak, alias ("sys_ni_syscall")));
> > +
> 
> This is what Linus threw out before - when David wanted to use it to remove
> all the intermodule crap.
> 
> It doesn't work with some architecture binutils

As of at least 2.11.2 (fairly certain) and 2.12 (definite) this should
work on every architecture...

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference
  2002-03-16 17:39     ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Alan Cox
                         ` (2 preceding siblings ...)
  2002-03-16 19:18       ` Daniel Jacobowitz
@ 2002-03-18  3:20       ` David S. Miller
  3 siblings, 0 replies; 9+ messages in thread
From: David S. Miller @ 2002-03-18  3:20 UTC (permalink / raw)
  To: torvalds; +Cc: alan, viro, linux-kernel

   From: Linus Torvalds <torvalds@transmeta.com>
   Date: Sat, 16 Mar 2002 10:15:33 -0800 (PST)
   
   On Sat, 16 Mar 2002, Alan Cox wrote:
   > This is what Linus threw out before - when David wanted to use it
   > to remove all the intermodule crap.
   > 
   > It doesn't work with some architecture binutils
   
   How true is that these days, though?

It is still true, you will break the sparc64 link if you put that
stuff in again.  It isn't COFF or a.out, it is elf but there are
bugs in the tools.  And these are the only tools I happen to trust
for getting reliable kernels built.


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

end of thread, other threads:[~2002-03-18  3:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-16  8:02 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference to `sys_nfsservctl' Miles Lane
2002-03-16  8:53 ` Alexander Viro
2002-03-16 10:16   ` [PATCH] " Alexander Viro
2002-03-16 17:39     ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Alan Cox
2002-03-16 17:39       ` Alexander Viro
2002-03-16 18:01         ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined Alan Cox
2002-03-16 18:15       ` [PATCH] Re: 2.5.7-pre2 -- kernel.o(.data+0x300): undefined reference Linus Torvalds
2002-03-16 19:18       ` Daniel Jacobowitz
2002-03-18  3:20       ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).