On Dec 17, 2005, Alexandre Oliva <[EMAIL PROTECTED]> wrote:

> On Dec 11, 2005, Alexandre Oliva <[EMAIL PROTECTED]> wrote:
>> On Dec  1, 2005, [EMAIL PROTECTED] (Geoffrey Keating) wrote:

>>> The easiest solution to this is to require that weakrefs must be
>>> 'static', because the name that they define is not visible outside
>>> this translation unit.

>> While this is true, not all properties of static names hold for
>> weakrefs.  If the name they refer to is not itself static, none of the
>> local-binding analysis properties will apply correctly if the wekaref
>> is marked as static.  I felt it was safer to keep it extern.

> As evidenced by the following testcase:

Grr, weakrefs, weak evidence :-)

as it turned out, this is an effect of COPY relocs or something along
these lines, that would indeed cause the data object to be local to
the executable.  As soon as I added -fpic (or even -fpie), it no
longer emitted code that assumed the data object to bind locally, as
expected.

What a great way to get oneself embarrassed in public! :-)

> I thus propose your change to be reverted, and request you to explain
> what you were trying to fix with this patch so that I can try to do
> something about it.

Nevermind this bit :-)


Jakub, do you have any further details on the s390 bootstrap failure
introduced with this patch?  I'm not aware of it, and I feel I should
do something about it, if it's not fixed yet.

That said, I do feel that testing for weakrefs in the binding test is
probably slower than ideal, and could possibly lead to incorrect
decisions elsewhere, in places that should be using the binding
function but aren't, which is why the change still makes me very
uncomfortable.  Geoff, did you actually search for any such places, or
had reasons to expect them to not exist?

Thanks,

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   [EMAIL PROTECTED], gcc.gnu.org}
Free Software Evangelist  [EMAIL PROTECTED], gnu.org}

Reply via email to