home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12687 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.9 KB  |  54 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!munnari.oz.au!yarrina.connect.com.au!codex!bpja
  3. From: bpja@codex.com.au (Brett Adam)
  4. Subject: Changing a shared library into a non-shared library
  5. Message-ID: <1992Nov9.041051.3266@codex.oz.au>
  6. Sender: bpja@codex.oz.au
  7. Reply-To: bpja@codex.com.au
  8. Organization: Codex Software Development Pty Ltd
  9. Date: Mon, 9 Nov 92 04:10:51 GMT
  10. Lines: 42
  11.  
  12. Under HP/UX 8.x on a 700 series machine, is it possible to modify/change a  
  13. shared library into a non-shared relocatable object file for input to the  
  14. linker?
  15.  
  16. The real question:
  17.  
  18. I have a shared library which I want to add new objects to. I don't have the  
  19. source to the shared lib. Hence, I need to find a way to feed an existing  
  20. shared library through the linker. (I think).
  21.  
  22. I'd like to be able to issue a command like the following:
  23.  
  24.     ld -b myshlib.sl myobj.o -o myshlib.new.sl
  25.  
  26. With the new shared library, containing everything from myshlib.sl + everything  
  27. from myobj.o, in myshlib.new.sl
  28.  
  29. Of course, the linker takes one look a myshlib.sl and says "oh, this is a  
  30. shared library, don't import its content, just refer to symbols from it" which  
  31. is of course what you normally want.
  32.  
  33. Having examined the header structures, etc. I can't see much difference between  
  34. a shared library and a relocatable executable at the structural level. Sure a  
  35. shlib has additional dynamic loader entries in the code section, etc. but the  
  36. bulk of the content is still structurally the same.
  37.  
  38. I've tried changing the filetype from 0x10e to 0x106, but without knowing the  
  39. checksum algorithm used for the fileheader, the linker rejects my file as being  
  40. corrupt.
  41.  
  42.  
  43. Anyone have any ideas/insights?
  44.  
  45. Thanks in advance,
  46.  
  47.  
  48.  
  49. -- 
  50. -------------------------------------------------------------------
  51. Brett Adam                                      
  52. Xedoc Software Development Pty. Ltd.           Melbourne, Australia
  53. Phone    :                                           +61 3 696 2490
  54.