Subject: misc/7314: machine/asm.h should indicate if underscores used in C labels.
To: None <email@example.com>
From: Simon J. Gerraty <firstname.lastname@example.org>
Date: 04/04/1999 01:03:04
>Synopsis: machine/asm.h should indicate if underscores used in C labels.
>Responsible: misc-bug-people (Misc Bug People)
>Arrival-Date: Sat Apr 3 07:05:00 1999
>Originator: Simon J. Gerraty
System: NetBSD zen.quick.com.au 1.3.2 NetBSD 1.3.2 (ZEN-PUC) #4: Thu Feb 11 17:34:27 EST 1999 email@example.com:/u3/NetBSD/1.3.2/src/sys/arch/i386/compile/ZEN-PUC i386
Sorry, Category should really be port-* but I figured that would cause
src/sys/arch/*/include/asm.h defines macros like _C_LABEL() that hide
the fact that _ is used on some architectures and not others.
But since one cannot do:
__STRING(_C_LABEL(write)), to get "write" or "_write" as the case may be,
it would be very handy if there were a #define somewhere that simply
indicated that _ is needed.
Why? I'm hacking on the JDK 1.2 sources and trying to make as much of it as
possible - simply "work" on various architectures. In so doing I'd
prefer to avoid the JDK having to track for itself whether i386 uses _
this week or not (since we know it will change soon).
Adding something like:
#define _C_LABEL_UNDERSCORE "_"
to src/sys/arch/*/include/asm.h (where appropriate) would make life much
easier. As I could then use
# define _C_LABEL_UNDERSCORE ""
etc in the list of lables that the JDK needs to lookup in libc.
An equivalent macro that allowed one to produce the string "_read" or "read"
as appropriate would be eqally useful.