delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/11/05:02:55

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
X-Authenticated: #14308112
Date: Fri, 11 Mar 2005 12:01:49 +0200
From: Pavel Tsekov <ptsekov AT gmx DOT net>
X-X-Sender: ptsekov AT mordor
cc: cygwin AT cygwin DOT com, binutils AT sourceware DOT org
Subject: Re: Possible bug in gas/ld when using .linkonce
In-Reply-To: <001001c525b7$20881800$2d4861cb@DANNY>
Message-ID: <Pine.CYG.4.58.0503111147360.1188@mordor>
References: <Pine DOT CYG DOT 4 DOT 58 DOT 0503101607001 DOT 624 AT mordor> <001001c525b7$20881800$2d4861cb AT DANNY>
MIME-Version: 1.0
X-Y-GMX-Trusted: 0
X-IsSubscribed: yes

On Fri, 11 Mar 2005, Danny Smith wrote:

> I don't think your usage of .linkonce in your example is quite corect.
>
> In PECOFF, each linkonce symbol needs to have its own unique section.  When you
> try to put  more than one linkonce symbol into a section you get problems like
> those mentioned here:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14808

I didn't say that it is correct, but obviously it was allowed by the
toolchain. The described behaviour seemed strange to me so I thought I'd
post just in case someone else is interested. At the end this seems to be
a false alarm.

> Secondly, I believe you need to specify a linkonce type (ie, one_only, discard,
> same_size, same_content)

I red the gas manual before posting the original message - it says:

   The TYPE argument is optional.  If specified, it must be one of the
following strings.  For example:
     .linkonce same_size
   Not all types may be supported on all object file formats.

`discard'
     Silently discard duplicate sections.  This is the default.

`one_only'
     Warn if there are duplicate sections, but still keep only one copy.

`same_size'
     Warn if any of the duplicates have different sizes.

`same_contents'
     Warn if any of the duplicates do not have exactly the same
     contents.

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