home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!news.dell.com!uudell!pensoft!mike
- From: mike@pencom.com (Mike Heath)
- Newsgroups: comp.unix.aix
- Subject: Re: AIXv3 shared-library binding anomolies
- Message-ID: <1992Jul25.063451.6994@pencom.com>
- Date: 25 Jul 92 06:34:51 GMT
- References: <PRENER.92Jul21033506@prener.watson.ibm.com> <1992Jul23.235023.5246@pencom.com> <PRENER.92Jul24025541@prener.watson.ibm.com>
- Sender: usenet@pencom.com (Usenet Psuedo User)
- Distribution: comp
- Organization: Pencom Software, Austin, TX
- Lines: 31
-
- In article <PRENER.92Jul24025541@prener.watson.ibm.com> prener@watson.ibm.com (Dan Prener) writes:
- >In article <1992Jul23.235023.5246@pencom.com> mike@pencom.com (Mike Heath) writes:
- >>They are bound at link time, but the relocation information is retained.
- >>They could be rebound at load-time, but rebinding to an out-of-module
- >>routine would further complicate the program loader. Also, how would
- >>the memory segment be shared among multiple processes?
- >
- >The calls from one routine in a shared library to another routine in
- >a shared library can not be rebound at load time, since the only field
- >that is relocated is the (relative) displacement in the branch-and-link
- >instruction, and the instructions in shared library routines are shared
- >by all processes. Therefore you cannot change the target of the branch
- >for one process without changing it for all processes.
-
- What's to prevent the program loader from roping off a segment of memory
- for each process at the same address (it's already pretty strict about
- addresses), shoving in a TOC that contains an entry for each local symbol
- referenced in the shared object, and using the TOC to determine where to
- branch? Granted, another level of indirection takes a performance hit,
- but it can be done. You could even have ld put in the glink code when
- the library is built. Not very pretty, though.
-
- How do other platforms do it?
-
- Playing devil's advocate today...
-
- --
- Mike Heath Pencom ... We're not just headhunters anymore.
- Pencom Software
- Austin, TX
- mike@pencom.com
-