portability

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Jan 22 00:26:38 AEST 1989


In article <877 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
>What I think AT&T plans to do for S5R4, for example, is to *rename*
>the "write" routine "_write", and have a mechanism by which the linker
>will let "_write" satisfy unresolved references for "write"...

I believe they plan something along those lines, but it's important
to note that it isn't really necessary to augment the linker in order
to meet the ANSI C constraints; the C library can contain entries for
both _write and write, with the standard C functions using only the
former.  The most significant drawback to the scheme is that both the
C library and traditional programs that use write() and standard I/O
will increase in size if there is actually redundant code with two
names.  If it weren't for the recent use of "random archive" tables
of contents, but instead libraries were sequentially searched as in
good old original UNIX, then the additional size could also be
avoided using existing linkers by arranging for a 0-length module
containing the "write" entry point occur immediately before the one
with the code labeled "_write".



More information about the Comp.lang.c mailing list