home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8131 < prev    next >
Encoding:
Text File  |  1992-07-23  |  3.5 KB  |  73 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!yktnews!prener
  3. From: prener@watson.ibm.com (Dan Prener)
  4. Subject: Re: AIXv3 shared-library binding anomolies
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <PRENER.92Jul24025541@prener.watson.ibm.com>
  7. In-Reply-To: mike@pencom.com's message of 23 Jul 92 23:50:23 GMT
  8. Date: Fri, 24 Jul 1992 07:55:41 GMT
  9. Distribution: comp
  10. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  11. References: <PRENER.92Jul19022217@prener.watson.ibm.com> <1992Jul20.223521.1080@ultra.com>
  12.     <PRENER.92Jul21033506@prener.watson.ibm.com>
  13.     <1992Jul23.235023.5246@pencom.com>
  14. Nntp-Posting-Host: prener.watson.ibm.com
  15. Organization: IBM T.J. Watson Research Center, Hawthorne, New York
  16. Lines: 55
  17.  
  18. My apologies for the depth of nesting in the following citations.  I was not
  19. clear enough in my previous posting.
  20.  
  21. In article <1992Jul23.235023.5246@pencom.com> mike@pencom.com (Mike Heath) writes:
  22.  
  23. >In article <PRENER.92Jul21033506@prener.watson.ibm.com> prener@watson.ibm.com (Dan Prener) writes:
  24. >>In article <1992Jul20.223521.1080@ultra.com> marc@mercutio.ultra.com (Marc Kwiatkowski {Host Software-AIX}) writes:
  25. >>>There are two separate issues here.  First, the shared libc binds 
  26. >>>local function calls at load time.  
  27. >>
  28. >>Actually, it binds them at link time.  Is that what you mean by "load time"?
  29. >>I tend to think of load time as the time "exec" loads the program.
  30.  
  31. >They are bound at link time, but the relocation information is retained.
  32. >They could be rebound at load-time, but rebinding to an out-of-module
  33. >routine would further complicate the program loader.  Also, how would
  34. >the memory segment be shared among multiple processes?
  35.  
  36. The calls from one routine in a shared library to another routine in
  37. a shared library can not be rebound at load time, since the only field
  38. that is relocated is the (relative) displacement in the branch-and-link
  39. instruction, and the instructions in shared library routines are shared
  40. by all processes.  Therefore you cannot change the target of the branch
  41. for one process without changing it for all processes.
  42.  
  43. >>... Given the
  44. >>lack of indirection in the current scheme, there is no way the bindings
  45. >>can be changed at run time.
  46.  
  47. >I don't see why not, but there would probably be a big price to pay.
  48.  
  49. For the reason given above: without indirection, through data rather
  50. than through program text, any change would apply to all processes.
  51.  
  52. >>>I am a little skeptical about the claims of improved performance by 
  53. >>>statically binding inter-library calls to exported functions.  What 
  54. >>>percentage of all function calls within libc.a are calls to libc.a entry 
  55. >>>points?
  56. >>
  57. >>The figure would depend on the application.  Statically, I think the
  58. >>vast majority are.
  59.  
  60. >Either I've misunderstood the question or the answer.  I think the question
  61. >was refering to the shared part of the C library.  That shouldn't change
  62. >with the application.  Sadly, the answer is more than you would have
  63. >thought.  I count over 1000 different routines referenced within itself.
  64. >Of course, damn near everything is exported.  The number of references
  65. >for each routine is unimportant.
  66.  
  67. The question was referring to calls from routines in the shared
  68. library.  The reason the performance would depend upon the application
  69. is that what matters is the dynamic count, rather than the static
  70. count, of how many such calls are to exported routines.
  71. --
  72.                                    Dan Prener (prener@watson.ibm.com)
  73.