This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: cygwin ld import library issue fix (removing unused "_nm_" symbols)
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: "Kde-Cygwin" <kde-cygwin at kde dot org>,"Cygwin-Apps" <cygwin-apps at cygwin dot com>,"Binutils" <binutils at sources dot redhat dot com>
- Date: Thu, 25 Apr 2002 20:44:08 +0200
- Subject: RE: cygwin ld import library issue fix (removing unused "_nm_" symbols)
> Do not use C++ style comments in C code. It is non-portable.
>
This is an updated patch against the current cvs release and without c++
comments and a (I hope) propper changeLog entry.
2002-04-25 Ralf Habacker <Ralf.Habacker@freenet.de>
* pe-dll.cc (autofilter_symbolprefixlist): don't export
reimported functions.
(make_one): let create only _nm_.. for data symbols
Index: pe-dll.c
===================================================================
RCS file: /cvs/src/src/ld/pe-dll.c,v
retrieving revision 1.38
diff -u -3 -p -r1.38 pe-dll.c
--- pe-dll.c 15 Feb 2002 02:11:05 -0000 1.38
+++ pe-dll.c 25 Apr 2002 18:34:43 -0000
@@ -252,6 +252,8 @@ static autofilter_entry_type autofilter_
/* { "__imp_", 6 }, */
/* Do __imp_ explicitly to save time. */
{ "__rtti_", 7 },
+ /* Don't export reimported functions*/
+ { "_nm_", 4 },
{ "__builtin_", 10 },
/* Don't export symbols specifying internal DLL layout. */
{ "_head_", 6 },
@@ -1793,8 +1795,11 @@ make_one (exp, parent)
quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC, BSF_GLOBAL, 0);
quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5, BSF_GLOBAL,
0);
/* Symbol to reference ord/name of imported
- symbol, used to implement auto-import. */
- quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6, BSF_GLOBAL, 0);
+ symbol, used to implement auto-import.
+ (only for data symbols) */
+ if (exp->flag_data)
+ quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6, BSF_GLOBAL,
0);
+
if (pe_dll_compat_implib)
quick_symbol (abfd, U ("__imp_"), exp->internal_name, "",
id5, BSF_GLOBAL, 0);