This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Proposed binutils PATCH] Re: Diagnosing an intricate C++ problem

>>>>> Loren James Rittle <> 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)

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]