access permissions in 1003.1
Doug Gwyn
gwyn at smoke.brl.mil
Sun Jun 16 12:27:52 AEST 1991
Submitted-by: gwyn at smoke.brl.mil (Doug Gwyn)
>All library routines are written to use the __ names; then, you have the
>linker accept an option that tells it to try to ignore the leading __ if
>there are unresolved externals.
Actually you don't need to hack the linker; you could supply a batch of
glue routines in the library like this:
* select -- system call interface for use by applications
* (C library must invoke __select instead of select)
global __select
entry select
select jmp __select
That way both applications that supply their own select() and those that
expect select() to be linked from the system library are happy.
The only reasons I can think of for hacking the linker instead are
(a) debugging looks neater
(b) a tiny amount of time is saved by not branching
(c) C library maintenance is slightly easier
[ This covers functions, but not data. Such as _iob -- mod ]
Volume-Number: Volume 24, Number 10
More information about the Comp.std.unix
mailing list