delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/09/15/02:01:30

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <48CDFA0D.D5CC3883@dessent.net>
Date: Sun, 14 Sep 2008 23:00:45 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] New experimental package: gcc4-4.3.0-1
References: <announce.001001c91336$91e70d10$9601a8c0 AT CAM DOT ARTIMI DOT COM> <48C8FE4D DOT 1090103 AT users DOT sourceforge DOT net> <013401c9140b$22b569c0$9601a8c0 AT CAM DOT ARTIMI DOT COM> <48CA2107 DOT FE8D0CB2 AT dessent DOT net> <01cb01c914db$53d34d80$9601a8c0 AT CAM DOT ARTIMI DOT COM> <48CAFDD9 DOT 641C423A AT dessent DOT net> <48CD71CC DOT 3060704 AT users DOT sourceforge DOT net>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

"Yaakov (Cygwin Ports)" wrote:

> OTOH, I really would like to see a dynamic libstdc++6 for 1.7.  So my
> question is, how far off is a real fix to binutils, and if it's not
> around the corner, will this workaround be compatible with the binutils
> fix when it does happen?

I haven't seen a plan outlined yet for how you'd solve this generically
and I rather doubt it's possible without special casing or otherwise
modifying the original code.   Like Dave said it's just one of those PE
differences that we have to live with, like no undefined symbols.  I
still don't see how binutils support for weak symbols matters in this
case at all, because unlike ELF the weak/strong-ness of a symbol does
not carry over into a shared library.  Or stated differently, the
support for weak symbols that PE does have applies at the object level,
but not for DLLs.  The OS loader just doesn't have the necessary
capability.

The only approach I can think of would be to have some macro magic that
you could apply to function decls in a library that you desire to be
interposable/overridable by the executable, which would add indirection
in the form of thunks and some kind of runtime support in the startup
code -- essentially just using the same method we have now for
malloc/free but making it extensible, with a dynamic list of function
names and pointer pairs instead of a few hardcoded function names.  But
again, this still would require special markup of the original source,
even if minimal.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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