Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Shankar Unni Subject: Re: cygwin, libtool, dlpreopen, and .rdata Date: Thu, 23 Sep 2004 10:11:16 -0700 Lines: 21 Message-ID: References: <41511C3F DOT 7080003 AT cwilson DOT fastmail DOT fm> <4151E85A DOT 5020305 AT cwilson DOT fastmail DOT fm> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT 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/