This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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: Miscompilation of glibc with CVS mainline


On Thu, Jan 02, 2003 at 08:02:18PM -0500, John David Anglin wrote:
> Isn't it possible for both a global define and weak defines to occur
> when a program is linked without incuring an error in the system V ABI?

Sure.

However, a strong use of a symbol *always* requires the symbol
to be defined.  If GCC sees that a symbol is used, and it is
not declared weak, then it knows that that symbol *must* be
defined.  The weakness of the definition doesn't enter into it.

> I think Ulrich has a point in questioning whether the optimization is
> useful.

On the contrary.  The optimization is *extremely* useful.
Just as useful as exposing the .hidden directives to the
compiler.

> To get the old behavior users are now forced to use
> something like gcc's TARGET_ATTRIBUTE_WEAK macro.

Yes.  IMO code that used inline assembly for this was simply broken.



r~


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