octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic loading in static exe


From: Mumit Khan
Subject: Re: dynamic loading in static exe
Date: Sun, 26 Jan 2003 21:12:33 -0600 (CST)

On Thu, 23 Jan 2003, Paul Kienzle wrote:

> I've been playing with dynamic loading into statically
> linked octave.  The attached tarball demonstrates the
> case of a dynamically loaded function calling back into
> the main exe under mingw.  I know similar things are
> possible on IRIX, and I believe they are under Linux.
> I don't know about OS/X.

This is quite a useful tool, expecially when you have "fat"
executables that export lots of useful stuff for other
loadable module style shared libraries to use. I haven't used
it in a while in new code -- I've found easier to just factor
out common code than have to worry about portability. I don't
see an obvious way to do this under OSX. The static linker
does have a way to export selected symbols, but I don't know
what it really does yet.

IMO, this technique is really useful for closed source apps
that deliver as a large executable, and allows the user to
extend it using shared libraries. I used one of these years
ago (it was an EM propagation code, now defunct).

> The question is, do we want to support it?  Is there
> any advantage to static linking under Windows, other
> than fewer files to work with?

Doesn't Octave already support it? At least on most Unix'y
platforms, it uses -rdynamic, the portable name for which
is -E or --export-dynamic, and does what you expect.

I don't think there's much advantage in Octave as the
loadable modules use symbols out of liboctave, libcruft
and not really from Octave executable itself. One reason
that the .oct files are so big under Windows is due to
the lack of shared libstdc++, which is always linked in
each .oct file.

Regards,
Mumit




reply via email to

[Prev in Thread] Current Thread [Next in Thread]