Or:

 > ::modctl ! grep zfs
      300012ab908      300012b3500     li 0x00   0 fs/zfs

 > 300012b3500::print struct module filename
filename = 0x300017df758 "/kernel/fs/sparcv9/zfs"


alex.

On 03/20/09 07:00, James Carlson wrote:
> 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.
> 

Reply via email to