This is the mail archive of the binutils@sourceware.org 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: RFC: weakref GCC attribute and .weakref assembly directive


On Oct 13, 2005, Daniel Jacobowitz <drow@false.org> wrote:

> On Thu, Oct 13, 2005 at 08:33:01AM -0500, Aaron W. LaFramboise wrote:
>> Could you compare your novel weak references to PECOFF's notion of "weak 
>> externals"?
>> 
>> .weak sym1 = sym2  # Analogous to: .weakref sym1, sym2

> The difference is that ".weak sym1 = sym2" resolves to sym1 (if
> available) else sym2; but ".weakref sym1, sym2" resolves to sym2 (if
> available) else zero.  Also sym1 does not become an external, only a
> local alias, IIRC.

Yep.  In `.weak sym1 = sym2', sym1 is a weak alias, which I actually
contrast with a weakref in the spec text I posted.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


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