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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!mips!swrinde!news.dell.com!uudell!pensoft!mike
  2. From: mike@pencom.com (Mike Heath)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: AIX 3.2 equivalent of syscall(2) and <syscall.h>?
  5. Message-ID: <1992Jul24.001344.5789@pencom.com>
  6. Date: 24 Jul 92 00:13:44 GMT
  7. References: <1992Jul21.203837.9228@math.waterloo.edu>
  8. Sender: usenet@pencom.com (Usenet Psuedo User)
  9. Organization: Pencom Software, Austin, TX
  10. Lines: 19
  11.  
  12.  
  13. You could write your own syscall.h and syscall() routine.  You would
  14. need to put it in it's own shared object and import the
  15. system calls from /lib/syscalls.exp.  The body of the routine would
  16. just be a big switch statement on the first argument.  You also
  17. want to statically link your application with the C library, but not
  18. the syscall() you've written.  It will need to remain shared.
  19.  
  20. The reason you need to do this is because your re-using the same
  21. symbol names.  The statically bound segments will use your definition.
  22. The shared syscall() will use the real symbols from the kernel.
  23.  
  24. This should be a good exercise in how to use ld.
  25.  
  26. -- 
  27. Mike Heath        Pencom ...  We're not just headhunters anymore.
  28. Pencom Software        
  29. Austin, TX        
  30. mike@pencom.com
  31.