Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

RE: Dynamic loading on Cygwin - status



>
> - for dlsym() to find a symbol, it has to explcitly exported. It means, that
> module's setup() etc functions are not found. They has to be defined with
> __attribute__((__dllexport__)). All exported symbols (that have mod_export)
> currently get this automatically.
>

dllwrap --export-all-symbols

Do you understand now, why Win32 programs have such a size? :-)

(This is quick fix. As we actually need just four functions in addition to
mod_export'ed, it is better to define additional token that is defined on
Cygwin to __attr...)

> - external function or variable imported from another module is not
> considered
> a constant on Cygwin (actually, on Windows). Hence, any static initializer
> fails, e.g

That is really bad. Alternatives are

- compile such module into main DLL. We may somehow automate it by putting
hint into .mdd file
- pretend itself run-time linker and resolve address itself.
- rewrite zsh in C++ ...


Now I *really* have working Zsh will dynamic loading. Unfortunately,
completion is not really useable without parameters module ... just tried

zmodload zsh/mapfile
vared 'mapfile[init.syms]'

it works!

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author