Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!husc6!rice!sun-spots-request From: jdh@bu-it.bu.edu (Jason Heirtzler) Newsgroups: comp.sys.sun Subject: dynamic linking feature or fault ? Keywords: SunOS Message-ID: <626@brazos.Rice.edu> Date: 29 Jul 89 06:08:13 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 27 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 89, message 10 of 14 Compile the following under SunOS 4.0 #include#include 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