dynamic linking feature or fault ?
    Jason Heirtzler 
    jdh at bu-it.bu.edu
       
    Sat Jul 29 16:08:13 AEST 1989
    
    
  
Compile the following under SunOS 4.0
	#include <stdio.h>
	#include <netdb.h>
	main()
	{
	   struct hostent *h;
	   h = gethostent( );
	}
	sendto()
	{
	   printf( "hello\n" );
	}
When you run it, it will print "hello" and then hang.  In the bowels of
gethostent there's a call to YP (no matter that I wasn't running YP..)
which wants to call the sendto(2) in libc, but instead..
While this lends itself to all kinds of neat hacks, the question is: is ld
doing the correct thing ?  Should it complain about a doublely defined
function ?  Should it do something different ?
Jason Heirtzler
Boston University
    
    
More information about the Comp.sys.sun
mailing list