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.