Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
To: cygwin@cygwin.com
From: Shankar Unni <shankarunni@netscape.net>
Subject: Re: cygwin, libtool, dlpreopen, and .rdata
Date: Thu, 23 Sep 2004 10:11:16 -0700
Lines: 21
Message-ID: <civ04c$prm$1@sea.gmane.org>
References: <41511C3F.7080003@cwilson.fastmail.fm> <Pine.CYG.4.58.0409221012570.2736@fordpc.vss.fsi.com> <cisbll$m8u$1@sea.gmane.org> <4151E85A.5020305@cwilson.fastmail.fm>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: ppp-67-124-90-144.dsl.pltn13.pacbell.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Thunderbird/0.8 Mnenhy/0.6.0.101
In-Reply-To: <4151E85A.5020305@cwilson.fastmail.fm>
X-IsSubscribed: yes

Charles Wilson wrote:

> Actually, *function* addresses are fine; they don't get relocated (at 
> least, not by the runtime-pseudo-reloc gobbledygook).  It's only the 
> addresses of DATA items exported by DLLs that get relocated in this way.
> 
> AND, they get relocated IF AND ONLY IF you are linking to a DLL.  

On x86/PE, anyway. The rules for other platforms and object-file formats 
vary.

Leaving this as "implementation-defined" (may or may not work - 
documented, but how easy is it to track down this documentation?) makes 
the programmer's task more difficult - they can never be sure where they 
can use 'const' on an initialized structure definition. What if function 
addresses are also 'bad' on some other platform?

Gcc should either warn about this usage, or it should silently "do the 
right thing" on each platform based on its capabilities.

But I'm just being picky, being an old compiler fart..


--
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/

