home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / bind / bind-4.001 / bind-4~ / bind-4.9.3-BETA9 / conf / Info.Ultrix-VAX < prev    next >
Internet Message Format  |  1994-07-21  |  4KB

  1. Received: by gw.home.vix.com id AA21040; Tue, 19 Jul 94 15:20:16 -0700
  2. Received: from localhost (mailer@localhost) by gatekeeper.ray.com (8.6.4/8.6.5) id SAA15612 for <paul@vix.com>; Tue, 19 Jul 1994 18:17:16 -0400
  3. Received: from sccux1.msd.ray.com by gatekeeper.ray.com; Tue Jul 19 18:18:31 1994
  4. Received: (from wag@localhost) by sccux1.msd.ray.com (8.6.9/8.6.9) id SAA29713 for <paul@vix.com>; Tue, 19 Jul 1994 18:18:05 -0400
  5. From: Bill Gianopoulos <wag@sccux1.msd.ray.com>
  6. Message-Id: <199407192218.SAA29713@sccux1.msd.ray.com>
  7. Subject: Info.Ultrix.VAX
  8. To: <paul@vix.com> (Paul A Vixie)
  9. Date: Tue, 19 Jul 1994 18:18:04 -0400 (EDT)
  10. X-Mailer: ELM [version 2.4 PL23]
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=US-ASCII
  13. Content-Transfer-Encoding: 7bit
  14. Content-Length: 2793      
  15.  
  16. This is the stuff I promised you about linking on a ULTRIX VAX platform.
  17.  
  18. There is a problem in the Ultrix VAX version of the ld command which
  19. causes problems when linking modules using the bind-4.9.3 resolver
  20. library.  The ld command is not working according to the documentation
  21. on its man page which states "If the argument is a library, it is
  22. searched only once at the point it is encountered in the argument list.
  23. Only those routines defining an unresolved external reference are loaded."
  24. In fact, if the library has been processed by ranlib, and a routine
  25. is loaded to resolve an unsatisfied external reference, any other modules
  26. which contain any entry point referenced by that module will be loaded
  27. even if the reference has already been resolved by a previously loaded
  28. module.  This causes duplicate entry points to be loaded and results in
  29. ld errors when you try to link.
  30.  
  31. The approach I use to get around this problem is to split the standard
  32. Ultrix libc.a into 2 libraries, one called liboldres.a which contains
  33. the resolver routines from the Ultrix release libc.a, and a libc.a which
  34. contains everything except the resolver routines.
  35.  
  36. It is then possible to link using the released Ultrix resolver by specifying
  37. "-loldres" on the ld (or cc) command, or using the new resolver by specifying
  38. "-lresolv -l44bsd".
  39.  
  40. the shell script I use to create the 2 libraries follows:
  41.  
  42. #!/bin/sh
  43. #
  44. # Split the released Ultrix libc.a into 2 libraries.  The resultant
  45. # libc.a will not contain the resolver routines which are present
  46. # in the new libresolv.a which will be built by the bind install.
  47. # The resolver routines from the released Ultrix libc.a will be
  48. # put in a new liboldres.a library.  The original libc.a will be saved
  49. # as libcold.a.
  50. #
  51. if [ -f /usr/lib/libcold.a ]
  52. then
  53.   echo "/usr/lib/libcold.a already exists."
  54.   exit 1
  55. fi
  56. if [ -f /usr/lib/liboldres.a ]
  57. then
  58.   echo "/usr/lib/liboldres.a already exists."
  59.   exit 1
  60. fi
  61. rm -r /tmp/libres$$
  62. mkdir /tmp/libres$$
  63. cd /tmp/libres$$
  64. ar x /usr/lib/libc.a gethostent.o getnetent.o herror.o res_comp.o \
  65.                      res_debug.o res_init.o res_mkquery.o res_query.o \
  66.                      res_send.o
  67. ar r /usr/lib/liboldres.a *.o
  68. ranlib /usr/lib/liboldres.a
  69. cd /tmp
  70. rm -r libres$$
  71. cp /usr/lib/libc.a /usr/lib/libcold.a
  72. ar d /usr/lib/libc.a gethostent.o getnetent.o herror.o res_comp.o \
  73.                      res_debug.o res_init.o res_mkquery.o res_query.o \
  74.                      res_send.o
  75. ranlib /usr/lib/libc.a
  76.  
  77. -- 
  78. William A. Gianopoulos; Raytheon Missile Systems Division
  79. wag@sccux1.msd.ray.com
  80. -------------------------------------------------------------------------
  81. My opinions are my own and do not in any way represent the opinions of my
  82. employer.
  83. -------------------------------------------------------------------------
  84.