ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2002/05/20/13:33:51

Mailing-List: contact cygwin-apps-help AT cygwin DOT com; run by ezmlm
Sender: cygwin-apps-owner AT cygwin DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT cygwin DOT com>
List-Help: <mailto:cygwin-apps-help AT cygwin DOT com>, <http://sources.redhat.com/lists.html#faqs>
Mail-Followup-To: cygwin-apps AT cygwin DOT com
Delivered-To: mailing list cygwin-apps AT cygwin DOT com
From: "Ralf Habacker" <Ralf DOT Habacker AT freenet DOT de>
To: "Cygwin-Apps" <cygwin-apps AT cygwin DOT com>
Subject: RE: binutils status
Date: Mon, 20 May 2002 19:33:34 +0200
Message-ID: <000901c20024$77bd9110$b96407d5@BRAMSCHE>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

> 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 DOT Habacker AT freenet DOT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019