preserve parameter attributes during C++ decl smashing

H.J. Lu hjl.tools@gmail.com
Wed Apr 29 00:23:00 GMT 2009


On Tue, Apr 28, 2009 at 3:40 PM, Mark Mitchell <mark@codesourcery.com> wrote:
>
> If we emit a definition of "f", I don't think we should emit it as weak.
>  AFAIK, it only makes sense for a symbol to be weak when we are emitted
> a reference to it, not a definition of it.  But, that's not really a
> question about merging attributes; the same question applies to:
>
>   __attribute__((weak)) void f(int i) { ... }
>

Try

#  readelf -s --wide libstdc++.a| grep WEAK

on Linux. You may find many weak definitions.


-- 
H.J.



More information about the Gcc-patches mailing list