bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

linking problem in fatfs


From: Thomas Schwinge
Subject: linking problem in fatfs
Date: Sat, 31 Mar 2007 13:17:42 +0200
User-agent: Mutt/1.5.11

Hello!

Now that I got the fatfs translator working again, there is one remaining
issue: linking the fatfs translator statically currently fails like this:

#v+
../libdiskfs/libdiskfs.a(node-create.o): In function `diskfs_create_node':
/var/tmp/hurd-io+stat+fatfs/hurd-20060825/build-tree/hurd/libdiskfs/node-create.c:39:
 multiple definition of `diskfs_create_node'
node-create.o:/var/tmp/hurd-io+stat+fatfs/hurd-20060825/build-tree/hurd/fatfs/node-create.c:52:
 first defined here
/usr/bin/ld: Warning: size of symbol `diskfs_create_node' changed from 977 in 
node-create.o to 818 in ../libdiskfs/libdiskfs.a(node-create.o)
collect2: ld returned 1 exit status
#v-

This is because the diskfs_create_node function of libdiskfs is not
suitable for the fatfs translator and thusly a private one is provided.
The same is done for the diskfs_S_fsys_getfile function.  There is one
difference, however: the latter function is not used in the libdiskfs
code, while the former is.  So it is possible to simply override the
latter, while for the former this will lead to the above error.  (Why
don't we get this error when dynamically linking?  -- Does it actually
work as expected?  Why don't we get this error at the statically linking
step of a cross compilation?)

Is it correct to rename diskfs_create_node in libdiskfs and make that a
weak alias to the diskfs_create_node, so that it can later be overridden
in the fatfs code?


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]