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]

2.12 branch: Sparc visibility failures


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.


Is that really working around what the test is supposed to be testing,
or is my interpretation correct?  Jakub?

(Interestingly, the S-records failure Christian and Jakub were
discussing does not show up on my Sparc at all.  Did someone
stealth-fix this while I wasn't looking?)

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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