home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / volume.24 / text0008.txt < prev    next >
Encoding:
Text File  |  1991-09-03  |  944 b   |  29 lines

  1. Submitted-by: gwyn@smoke.brl.mil (Doug Gwyn)
  2.  
  3. >All library routines are written to use the __ names; then, you have the
  4. >linker accept an option that tells it to try to ignore the leading __ if
  5. >there are unresolved externals.
  6.  
  7. Actually you don't need to hack the linker; you could supply a batch of
  8. glue routines in the library like this:
  9.  
  10.     * select -- system call interface for use by applications
  11.     *        (C library must invoke __select instead of select)
  12.         global    __select
  13.         entry    select
  14.     select    jmp    __select
  15.  
  16. That way both applications that supply their own select() and those that
  17. expect select() to be linked from the system library are happy.
  18.  
  19. The only reasons I can think of for hacking the linker instead are
  20.     (a) debugging looks neater
  21.     (b) a tiny amount of time is saved by not branching
  22.     (c) C library maintenance is slightly easier
  23.  
  24.  
  25. [ This covers functions, but not data.  Such as _iob -- mod ]
  26.  
  27. Volume-Number: Volume 24, Number 10
  28.  
  29.