[Mono-dev] Static Bundling
apenwarr at gmail.com
Wed Dec 19 10:25:19 EST 2007
On 19/12/2007, Paolo Molaro <lupus at ximian.com> wrote:
> From the manpage:
> mkbundle generates an executable program that will contain static
> copies of the assemblies listed on the command line.
> And it does exactly what it's documented to do.
It also does more than just that, since it has options like
"--static". It seems to solve quite a lot of the world's problems,
> If you need additional capabilities you can roll your own, like
> linking the libs to your program yourself and redirecting the p/invoke
> calls as explained in man mono-config.
This is the part that confused me: reading man mkbundle doesn't
explain the limitations. Thanks for the explanation.
The p/invoke stuff seems like it might be easy enough to fake by
linking to a static library instead of a dynamic one, and then looking
for dynamic symbols in dlopen(NULL) (ie. the executable file). The
executable would have to be linked with -rdynamic in that case so that
it exports its own symbols. All a bit tricky to get right, though.
More information about the Mono-devel-list