On 15-Oct-99 at 15:05, John Birrell ([EMAIL PROTECTED]) wrote:
> On Fri, Oct 15, 1999 at 08:09:57PM +0200, Wilko Bulte wrote:
> > Sheer curiosity and most likely a somewhat dim question:
> > 
> > what the h* is a weak versus a strong symbol?
> 
> A weak symbol is like an alias for another (strong) symbol. The linker
> will link to strong symbols first, then, for any unresolved references,
> it will try to resolve against the weak symbols before going on to
> the next library. Weak symbols are a good way to hide things in order
> to stop polluting the name space. But they can cause problems too.

If so, then the definition has changed since they were first invented.
(Around 20 years ago, IIRC.)  Weak symbols were/are used to refer
to external objects that may or may not actually be linked in.  The
difference between a weak and a strong symbol is/was that a strong
symbol would cause the appropriate library to be loaded to ensure
that it would be defined (and generate errors if still unresolved at
the end of the link) whereas a weak symbol would not cause a library
module to be loaded and would not cause an error if left unresolved.

I don't recall any consistant name for the behavour you describe,
but it was traditionally handled by the linker control file.  (Of
course, this was on systems which had somewhat smarter linkers than
unix's.)


-Pat


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to