> Unfortunately, it can't do that; Mach-O (on Darwin) doesn't support > aliases in the object file at all, and even ELF doesn't support > aliases to symbols outside the current .o. 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. > > There's an additional wrinkle, which is although this name is > 'static', it is also 'weak' because it can be NULL. So we have > introduced a new concept, a static weak name. Fortunately it is > limited to just this one case.
The hpux linker and dynamic loader don't support undefined symbols. Thus, weakrefs are essentally useless as currently implemented. In principle, GAS can handle 'weak' 'static' symbols under hpux. Thus, I like your idea. However, there are issues with using weakrefs in at least some of the gthr files. Alexandre is looking at these. Dave -- J. David Anglin [EMAIL PROTECTED] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)