Sambit Nayak writes:
> A follow-up question : Now that I know the module name that defines a symbol,
> how do I find what's the path to the kernel module on the root filesystem?
>
> eg,
> > dsl_prop_set_sync::nm -f obj,name
> Object Name
> zfs |dsl_prop_set_sync
Here's how I'd do it:
> dsl_prop_set_sync$m
BASE LIMIT SIZE NAME
fffffffff788f000 fffffffff792abe0 9bbe0 zfs
> ::offsetof modctl_t mod_text
offsetof (modctl_t, mod_text) = 0x70
> ::offsetof modctl_t mod_mp
offsetof (modctl_t, mod_mp) = 0x18
> ::walk modctl | ::grep *(.+18) | ::grep *(.+70)==fffffffff788f000 | ::print
> modctl_t mod_mp | ::print "struct module" filename
filename = 0xffffff01cc464c90 "/kernel/fs/amd64/zfs"
>
Note that this is simply the path when the file was originally
loaded. There's no way to tell (from this alone) whether the file
might have been overwritten since then.
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677