home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!munnari.oz.au!yarrina.connect.com.au!codex!bpja
- From: bpja@codex.com.au (Brett Adam)
- Subject: Changing a shared library into a non-shared library
- Message-ID: <1992Nov9.041051.3266@codex.oz.au>
- Sender: bpja@codex.oz.au
- Reply-To: bpja@codex.com.au
- Organization: Codex Software Development Pty Ltd
- Date: Mon, 9 Nov 92 04:10:51 GMT
- Lines: 42
-
- Under HP/UX 8.x on a 700 series machine, is it possible to modify/change a
- shared library into a non-shared relocatable object file for input to the
- linker?
-
- The real question:
-
- I have a shared library which I want to add new objects to. I don't have the
- source to the shared lib. Hence, I need to find a way to feed an existing
- shared library through the linker. (I think).
-
- I'd like to be able to issue a command like the following:
-
- ld -b myshlib.sl myobj.o -o myshlib.new.sl
-
- With the new shared library, containing everything from myshlib.sl + everything
- from myobj.o, in myshlib.new.sl
-
- Of course, the linker takes one look a myshlib.sl and says "oh, this is a
- shared library, don't import its content, just refer to symbols from it" which
- is of course what you normally want.
-
- Having examined the header structures, etc. I can't see much difference between
- a shared library and a relocatable executable at the structural level. Sure a
- shlib has additional dynamic loader entries in the code section, etc. but the
- bulk of the content is still structurally the same.
-
- I've tried changing the filetype from 0x10e to 0x106, but without knowing the
- checksum algorithm used for the fileheader, the linker rejects my file as being
- corrupt.
-
-
- Anyone have any ideas/insights?
-
- Thanks in advance,
-
-
-
- --
- -------------------------------------------------------------------
- Brett Adam
- Xedoc Software Development Pty. Ltd. Melbourne, Australia
- Phone : +61 3 696 2490
-