2.12 branch: Sparc visibility failures
H . J . Lu
hjl@lucon.org
Sat Feb 16 22:34:00 GMT 2002
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.
More information about the Binutils
mailing list