Dollars and Sense
Kevin Martin
kpmartin at watmath.UUCP
Tue Jan 1 00:30:07 AEST 1985
>There has been much discussion lately about using dollar signs
>in identifier names or providing a mechanism in a C program
>to associate a particular linker or assembler symbol with a particular
>identifier.
>I do not think that C source is the appropriate place to put
>this information, but if one must, why not use the normal mechanism.
>
> asm("_sys_read = SYS$READ") ;
Not every C compiler passes through an assembler. Not every C compiler
supports the 'asm' "function". Even among C compilers which call
assemblers, not all of them call 'as'.
>On many UNIX brand systems, subroutines that call system calls
>are written in assembly language and the object code is put in a library.
>The subroutines provide both the appropriate subroutine linkage and return
>sequence for C programs and the appropriate naming convention for C programs.
>This seems to me to be a reasonable solution that could be used
>in other applications or systems if it is necessary to deal
>with strange symbols.
> George Rosenberg
> idis!george
There is more in question than UNIX systems. Some of the strange names
exist because of restrictions in the library implementation language
(e.g. assembler), such as not allowing leading underscores in external
names.
Kevin Martin, UofW Software Development Group
More information about the Comp.lang.c
mailing list