PATCH: PR 29487
Mark Mitchell
mark@codesourcery.com
Wed Feb 7 02:15:00 GMT 2007
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
More information about the Gcc-patches
mailing list