On 2010-04-07 04:06, Bruno Haible wrote:
I was implicitly hoping that
- gcc would collect all weak-declared symbols in some table, and
generate code so that the reference to these symbols makes an indirection
through this table,
- the Cygwin runtime would call dlsym or GetProcAddress at startup and
fill in addresses into said table.
This is essentially what FlexDLL[1] does, as used by OCaml to support
shared stublibs and natdynlink modules on PE platforms. The major
drawback to FlexDLL (besides being nearly impossible to understand
because most of it is written in OCaml :-)) is that all link commands
must be passed through its flexlink command.
I suppose a possible solution would be to port flexlink to C as part of
gcc (or ld?) and merge the flexdll_*() functionality into Cygwin. That
would be way beyond me, however; I barely managed to learn enough about
OCaml to add some patches[2] necessary for a Cygwin-native flexdll
package for Ports.
[1] http://alain.frisch.fr/flexdll.html
[2]
http://cygwin-ports.svn.sourceforge.net/viewvc/cygwin-ports/ports/trunk/devel/flexdll/
Yaakov
Cygwin Ports
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple