home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8171 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  2.0 KB

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