This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: 2.12 branch: Sparc visibility failures


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.


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