This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
RE: binutils status
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: "Cygwin-Apps" <cygwin-apps at cygwin dot com>
- Date: Mon, 20 May 2002 19:33:34 +0200
- Subject: RE: binutils status
> 1) Ralf's "removing unused _nm_ symbol exports" fix
Relating to the thread
http://sources.redhat.com/ml/cygwin-apps/2002-04/msg00433.html i've updated this
patch to the latest cvs release.
--------------------------------------------------------------------------------
--
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
--------------------------------------------------------------------------------
--
$ cvs diff -ubBp pe-dll.c
Index: pe-dll.c
===================================================================
RCS file: /cvs/src/src/ld/pe-dll.c,v
retrieving revision 1.39
diff -u -3 -p -B -u -b -B -p -r1.39 pe-dll.c
--- pe-dll.c 3 May 2002 13:48:55 -0000 1.39
+++ pe-dll.c 20 May 2002 17:18:47 -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);
--------------------------------------------------------------------------------
--
Because revision 1.39 does not contain any functional changes and the patches
for 1.3.8 and 1.39 are the same (except some line offset), the tests I have
running in the above mentioned thread are valid.
----------------------------
revision 1.39
date: 2002/05/03 13:48:55; author: kazu; state: Exp; lines: +33 -33
* ld.h: Fix formatting.
* ldexp.c: Likewise.
* ldfile.c: Likewise.
* ldlang.c: Likewise.
* ldmain.c: Likewise.
* lexsup.c: Likewise.
* pe-dll.c: Likewise.
----------------------------
3) Ralf's patch for "objdump/cygwin crashes on auto-imported libs"
Nick Clifton has applied a patch for a similar problem, I will look if this
solve this already.
peXXigen.c
revision 1.7
date: 2002/05/15 15:28:12; author: nickc; state: Exp; lines: +54 -3
Do not assume that the first thunk is located in the same section as the
import table. Instead check, and if necessary load the section containing
the thunk.
Ralf