This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: 2.12 branch: Sparc visibility failures
- From: "H . J . Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Sat, 16 Feb 2002 21:42:11 -0800
- Subject: Re: 2.12 branch: Sparc visibility failures
- References: <20020216225620.A32610@nevyn.them.org>
On Sat, Feb 16, 2002 at 10:56:20PM -0500, Daniel Jacobowitz wrote:
> I see the six failures that Christian reported in elfvsb.exp. I looked
> at them for a little while, and it really looks to me as if the
> testcase is invalid. For hidden_weak and protected_weak, the code
> contains a stretch that looks like this:
>
> extern int visibility_var;
>
> ...
>
> if (&visibility_var)
> return visibility_var == 1;
> else
> return 1;
>
> ...
>
> asm (".weak visibility_var");
>
>
> GCC is well within its rights to load visibility_var in the delay slot
> of the address check in that `if' statement, and in fact does so. If
> you declare the variable as:
>
> extern int visibility_var __attribute__((weak));
>
> the failures are gone.
>
I think asm is used for none GCC compilers.
H.J.