Subject: misc/7314: machine/asm.h should indicate if underscores used in C labels.
To: None <>
From: Simon J. Gerraty <>
List: netbsd-bugs
Date: 04/04/1999 01:03:04
>Number:         7314
>Category:       misc
>Synopsis:       machine/asm.h should indicate if underscores used in C labels.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Apr  3 07:05:00 1999
>Originator:     Simon J. Gerraty
Zen Programming...
>Release:        99-04-01
System: NetBSD 1.3.2 NetBSD 1.3.2 (ZEN-PUC) #4: Thu Feb 11 17:34:27 EST 1999 i386

Sorry, Category should really be port-* but I figured that would cause
problems :-)

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:

to src/sys/arch/*/include/asm.h (where appropriate) would make life much 
easier.  As I could then use


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.