This is the mail archive of the cygwin@sourceware.cygnus.com 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]

ld and microsoft libraries



This has been partially hashed over before, but I thought I'd cover it
one more time:

Has anyone worked on gnu ld so that it will handle microsoft libraries.

Also I have a specific question:

Has anyone worked on implementing the microsoft comdat stuff. In the
microsoft libraries there are object files that contain, e.g., multiple
.text sections. Each of these text sections has a comdat symbol
associated with it. The microsoft linker pulls in a specific text section
only if the comdat symbol is referenced. This is a way to allow multiple
functions in a file, but only the functions that are referenced are
pulled in.

Also, the associative comdat is used so that, e.g., a debug$f section
is pulled in only if the associated text section is pulled in.

This seems pretty hard to do in the gnu linker -- in the
section_already_linked function in ldlang.c, it would be necessary to
see if the comdat symbol for a section had been referenced, and I have
no idea how to do this.

One hack is just to link in all the sections, whether they're referenced or
not. But this could result in incompatibility with the microsoft linker.

Ideas? Related work?

Thanks.

lfm
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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