home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / hp / 10009 < prev    next >
Encoding:
Text File  |  1992-09-03  |  2.1 KB  |  51 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!mcsun!sunic!corax.udac.uu.se!irfu.se!jhd
  3. From: jhd@irfu.se (Jan D.)
  4. Subject: Re: CC and /usr/lib/dld.sl
  5. Message-ID: <1992Sep3.140305.10965@irfu.se>
  6. Date: Thu, 3 Sep 1992 14:03:05 GMT
  7. References: <1992Sep1.091000.14893@irfu.se> <7371278@hpfcso.FC.HP.COM>
  8. Organization: Swedish Institute of Space Physics, Uppsala, Sweden
  9. Lines: 40
  10.  
  11. In article <7371278@hpfcso.FC.HP.COM> mjs@hpfcso.FC.HP.COM (Marc Sabatella) writes:
  12. >In comp.sys.hp, jhd@irfu.se (Jan D.) writes:
  13. >
  14. >> Anybody know why CC (HP C++ B2402  A.02.34 on a 730, HP-UX 8.07)
  15. >> always link in /usr/lib/dld.sl even if you say -Wl,-a,archive?
  16. >> 
  17. >> What does it do with it and is there anyway to get rid of it?
  18. >
  19. >What it does is use shl_get(3X) and shl_findsym(3X) to locate all static
  20. >constructors within shared libraries so it can execute them at startup time.
  21. >There was no easy way for "CC" to know if this was necessary or not - ie, it
  22. >doesn't parse the "ld" options to find out if you are using shared libraries or
  23. >not - so it always links in that library.
  24. >
  25. >If you don't mind this miniscule use of libdld.sl - one call to shl_get(3X) is
  26. >enough to convince CC there are no other shared libraries to worry about, then
  27. >just leave things alone.  If for some reason you can't tolerate even the
  28. >dependency on libdld.sl, you can use the output of "CC -v" to construct your
  29. >own link line (don't forget to run c++patch as shown by "CC -v" as well) and
  30. >leave off /usr/lib/libdld.sl, and provide dummy definitions of shl_get(3X) and
  31. >shl_findsym(3X).
  32. >
  33. >BTW, libC also makes references to shl_load and shl_unload, but those are only
  34. >to enable implementation of cxxshl_load and cxxshl_unload; if you aren't using
  35. >the latter, you won't need the former.
  36. >
  37.  
  38. Thanks for your answer. But I still get this from xdb:
  39.  
  40. <<<< XDB Version A.08.07 HP-UX >>>>
  41. Child died due to: segmentation violation
  42. Program died in unknown location (shared library), pc = 0x1000003
  43. Ignoring core file "core".
  44.  
  45. even if the program now is free from shared libraries. I thought
  46. /usr/lib/libdld.sl linked in something, but that can't be it.
  47. Sigh, back to the drawing board.
  48.  
  49.     Jan D.
  50.  
  51.