This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: PATCH: PR 29487


John David Anglin wrote:
>> The reason this change was made was for the benefit of functions
>> explicitly declared weak; such functions may be replaced by the user
>> at link-time, and we must therefore be conservative in making
>> assumptions about them.  The same is not true for COMDAT functions,
>> since all COMDAT functions must be functionally equivalent.
> 
> I hope I haven't confused the issue by mentioning "COMDAT" functions.
> The implementation of "COMDAT" in the 32-bit HP-UX linker
> predates and differs somewhat from that used in ELF objects.

I understand.  The use of COMDAT in my email was not meant to be exactly
"ELF COMDAT" but, rather, "things for which GCC sets DECL_COMDAT".  That
includes template instantiations, even when implemented as ELF weak
symbols on ELF systems without COMDAT, or other, non-ELF mechanisms.

What I was trying to do is make sure that weak functions can be
replaced, while not pessimizing the handling of template instantiations,
out-of-line inline functions, etc.

> I'll try the change ASAP.

Thank you!

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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