File:  [NetBSD Developer Wiki] / wikisrc / users / haad / rump_zfs_solaris.mdwn
Revision 1.1: download - view: text, annotated - select for diffs
Sat Oct 22 06:16:03 2011 UTC (11 years, 3 months ago) by wiki
Branches: MAIN
CVS tags: HEAD
web commit by schmonz: rename users/users/haad/rump_zfs_solaris.mdwn to users/haad/rump_zfs_solaris.mdwn

### Some public trash bin


08:23 <pwwka> oh, actually, for non-autoload you need to do the symbol renaming
08:25 <pwwka> so, if we assume we have kernfs.kmod
08:25 <pwwka> make RUMP_SYMREN=kernfs.kmod -f /sys/rump/Makefile.rump
08:25 <pwwka> and then you can compile a server:
08:25 <pwwka> cc simpleserver.c kernfs.kmod -lrumpvfs -lrump -lrumpuser -lpthread
08:25 <pwwka> and kernfs shows up in modstat
08:25 <pwwka> pain-rustique:2:~> rump.modstat
08:25 <pwwka> NAME             CLASS      SOURCE     REFS  SIZE     REQUIRES
08:25 <pwwka> kernfs           vfs        builtin    0     -        -
08:26 <haad> this make RUMP_SYMREN=kernfs.kmod -f /sys/rump/Makefile.rump will be executed where ? in kernfs module dir ?
08:27 <pwwka> no, don't do that, since it renames the symbols in the binary
08:27 <pwwka> so you won't be able to use it as a regular kernel module anymore
08:27 <pwwka> autoload does this in-memory, see librump/rumpkern/kobj_rename.c
08:28 <pwwka> but if you want to link stuff into a binary, you need to give the renamed file to the linker
08:28 <pwwka> since the linker doesn't know how to rename the symbols ;)
08:31 <pwwka> but, maybe it's easier to get the solaris stuff to compile as a lib
08:31 <pwwka> less magic involved ;)


CVSweb for NetBSD wikisrc <> software: FreeBSD-CVSweb