[Samba] Slimming down smbtree?

Matthew Dempsky matthew at dempsky.org
Mon Aug 24 12:29:01 MDT 2009


Sorry if these questions are getting tiring, but I want to get the
list of servers from "smbtree -NS" from an embedded system (e.g.,
custom wireless router firmware).  Unfortunately, compiling smbtree
ends up being a couple of MB large.  I've tried a bunch of basic
optimizations to shrink the executable size as possible (e.g., using
-f{function,data}-sections and --gc-sections, removing the share
enumeration code, eliminating the option handling), and at best it's
still barely under a megabyte.

Does anyone have any suggestions on how to slim smbtree down further,
or to possibly get the same information a different (read: more
code-size efficient) way?  I feel I'll need to start ripping out
unnecessary code from lower-level functions, but I'm wary of
inadvertently breaking something (if I haven't already).

Thanks.


More information about the samba mailing list