This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils 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]

[binutils-gdb] Add libmsvcrt, libmsvcrt-os and libucrtbase to the list of libraries for which the automatic generat


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9d9c67b06c1bf4c4550e3de0eb575c2bfbe96df9

commit 9d9c67b06c1bf4c4550e3de0eb575c2bfbe96df9
Author: Martin Storsjo <martin@martin.st>
Date:   Thu Nov 23 12:07:24 2017 +0000

    Add libmsvcrt, libmsvcrt-os and libucrtbase to the list of libraries for which the automatic generation of exported variables should be disabled.
    
    In the latest git version of mingw-w64, one can set the default
    libmsvcrt.a to actually be the import library of another CRT version,
    to facilitate switching to ucrtbase.dll. In these versions, the
    traditional libmsvcrt.a (for linking to msvcrt.dll) is also provided
    with the name libmsvcrt-os.a.
    
    The import libraries for the CRT also contain a number of compatibility
    wrapper functions. The ones in libmsvcrt.a have so far been excluded
    automatically since they in most cases come with a corresponding
    __imp_foo function. None of these make sense to export automatically
    from a DLL though, so add these libraries to the exclude list.
    
    libucrtbase.a contains a number of compatibility wrapper functions
    that don't have a corresponding __imp_foo symbol, which cause
    these symbols to be exported from DLLs.
    
    This can be worked around on the mingw-w64 side by adding extra
    __imp_ symbols, but since they aren't strictly necessary for linking
    to succeed, it's probably better long-term to add these libraries to
    the exclusion list.
    
    ld	* pe-dll.c (autofilter_liblist): Add libmsvcrt, libmsvcrt-os and
    	libucrtbase.

Diff:
---
 ld/ChangeLog | 5 +++++
 ld/pe-dll.c  | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 6ec3260..8638f7a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-23  Martin Storsjo  <martin@martin.st>
+
+	* pe-dll.c (autofilter_liblist): Add libmsvcrt, libmsvcrt-os and
+	libucrtbase.
+
 2017-11-23  Jan Beulich  <jbeulich@suse.com>
 
 	PR gas/22441
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index aee7b9d..d916766 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -344,6 +344,9 @@ static const autofilter_entry_type autofilter_liblist[] =
   { STRING_COMMA_LEN ("libsupc++") },
   { STRING_COMMA_LEN ("libobjc") },
   { STRING_COMMA_LEN ("libgcj") },
+  { STRING_COMMA_LEN ("libmsvcrt") },
+  { STRING_COMMA_LEN ("libmsvcrt-os") },
+  { STRING_COMMA_LEN ("libucrtbase") },
   { NULL, 0 }
 };


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