This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [Proposed binutils PATCH] Re: Diagnosing an intricate C++ problem
- To: rittle at rsch dot comm dot mot dot com
- Subject: Re: [Proposed binutils PATCH] Re: Diagnosing an intricate C++ problem
- From: Jason Merrill <jason at redhat dot com>
- Date: 02 Sep 2000 23:18:01 -0700
- Cc: pfeifer at dbai dot tuwien dot ac dot at, gcc-patches at gcc dot gnu dot org, binutils at sources dot redhat dot com
- References: <200007250811.DAA35595@latour.rsch.comm.mot.com>
>>>>> Loren James Rittle <rittle@latour.rsch.comm.mot.com> writes:
> /* As a GNU extension, if the name begins with .gnu.linkonce, we
> only link a single copy of the section. This is used to support
> g++. g++ will emit each template expansion in its own section.
> The symbols will be defined as weak, so that multiple definitions
> are permitted. The GNU linker extension is to actually discard
> all but one of the sections. */
> if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
> flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
This is unacceptable. Linkonce sections must be allowed to differ, to
allow for people using different optimization options in different .o's.
If you'd like, I suppose you could make this an option, but this must not
be the default behavior.
Microsoft uses DISCARD for code and SAME_SIZE for data, which seems
reasonable to me. I would even support SAME_CONTENTS for data, but code
should stay with DISCARD.
Jason