https://sourceware.org/bugzilla/show_bug.cgi?id=17910
Bug ID: 17910 Summary: Can't link with .lib (for dll) created by Visual Studio 2013 any more Product: binutils Version: 2.25 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: ssbssa at yahoo dot de Target: i686-w64-mingw32 Created attachment 8092 --> https://sourceware.org/bugzilla/attachment.cgi?id=8092&action=edit .lib created by Visual Studio 2013 In 2.24 it was still possible to link with .lib files created by VS2013. Now I get this message: $ gcc -olib-user lib-user.c vc-dll-lib.lib vc-dll-lib.lib: error adding symbols: File format not recognized collect2.exe: error: ld returned 1 exit status The vc-dll-lib.lib (32bit) is attached, and was created from this source: #include <stdio.h> __declspec(dllexport) int trythis(void) { printf("output\n"); return(1); } lib-user.c looks like this: __declspec(dllimport) int trythis(void); int main( void ) { return( trythis() ); } I've found out this was introduced by this commit: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a3f568b70bdfb91aacdfb66657b56d8c6d242f1 And the problem goes away if I revert a part like this: --- bfd/coffgen.c 2014-12-23 09:47:10.000000000 +0100 +++ bfd/coffgen.c 2015-01-12 20:00:38.642229000 +0100 @@ -463,8 +463,6 @@ if (strings == NULL) return NULL; } - if (sym->_n._n_n._n_offset >= obj_coff_strings_len (abfd)) - return NULL; return strings + sym->_n._n_n._n_offset; } } obj_coff_strings_len(abfd) is 0 in this example. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils