This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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[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.


Yaakov Cygwin Ports

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]