2.12 branch: Sparc visibility failures
Daniel Jacobowitz
drow@mvista.com
Sat Feb 16 21:42:00 GMT 2002
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
More information about the Binutils
mailing list