delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/22/13:10:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
To: cygwin AT cygwin DOT com
From: Shankar Unni <shankarunni AT netscape DOT net>
Subject: Re: cygwin, libtool, dlpreopen, and .rdata
Date: Wed, 22 Sep 2004 10:09:48 -0700
Lines: 18
Message-ID: <cisbll$m8u$1@sea.gmane.org>
References: <41511C3F DOT 7080003 AT cwilson DOT fastmail DOT fm> <Pine DOT CYG DOT 4 DOT 58 DOT 0409221012570 DOT 2736 AT fordpc DOT vss DOT fsi DOT com>
Mime-Version: 1.0
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: <Pine.CYG.4.58.0409221012570.2736@fordpc.vss.fsi.com>
X-IsSubscribed: yes

Brian Ford wrote:

> Yes, I see.  I hope Danny Smith might weigh in here?
> 
> http://sources.redhat.com/ml/binutils/2004-02/msg00003.html

I would argue that this is gcc's responsibility. If a const structure 
variable contains *any* code or data addresses, it's not safe to put it 
in .rdata (or .rodata, whatever the platform calls it), because of 
relocation issues.

So rather than detect a "DLL import", I'd say *any* function addresses 
in a const initializer should cause the variable to go into a regular 
.data section, without any complicated decision-making by binutils.

(Note: this is not the same problem that Danny talks about in that 
message - that usage was legitimate, and there was no attempt to have a 
const initialized variable with a data address.)


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