This is the mail archive of the
mailing list for the Cygwin project.
Re: weak symbols on Cygwin
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 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 necessary for a Cygwin-native flexdll
package for Ports.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple