This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR 29487
- From: Mark Mitchell <mark at codesourcery dot com>
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Cc: gcc-patches at gcc dot gnu dot org, amylaar at gcc dot gnu dot org, danglin at gcc dot gnu dot org
- Date: Tue, 06 Feb 2007 18:14:37 -0800
- Subject: Re: PATCH: PR 29487
- References: <200702070113.l171DuXU026233@hiauly1.hia.nrc.ca>
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