ld 'feature' failure to load some modules

Steve Dum steved at teklds.TEK.COM
Tue Aug 9 05:35:58 AEST 1988


When the loader is trying to resolve a undefined symbol, (nm says type 'U')
if it finds a module which has the symbol declared as uninitialized data
(nm says type 'C') in a library the loader extracts the size of the variable
from that module, but it does not load in the module.  Does anyone know if
this 'feature' is required by anything, or just due to historical reasons.
It looks like a bug to me.

This is on a 4.3 system, but I don't think it is 4.3 specific.

The reason I ask, is that this is exactly the wrong action for what I 
want to do.  Namely, a c++ compiler can define data as uninitialized
and also defines an initialiation routine which is resolved at load time
by doing a partial load and then building a table of initialization
routines to be called at program execution.  By only using the size, 
and not loading the rest of the module the variable is defined in, 
the code generated is incorrect.


---
Stephen Dum (503)-629-1146
US Mail:    Tektronix, Inc., MS 92-800, P.O. Box 4600, Beaverton, OR 97076-4600
uucp:       {allegra,decvax,hplabs,ucbvax}!tektronix!teklds!steved
CS,ARPAnet: steved at teklds.TEK.COM



More information about the Comp.unix.wizards mailing list