From: lfm AT pgroup DOT com (Larry Meadows) Subject: ld and microsoft libraries 1 May 1998 03:40:26 -0700 Message-ID: <199805010046.RAA14849.cygnus.gnu-win32@pacific.pgroup.com> To: gnu-win32 AT cygnus DOT com 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 AT cygnus DOT com" with one line of text: "help".