Subject: Re: SH3 ELF
To: Hiroyuki Bessho <>
From: Jason R Thorpe <>
List: tech-toolchain
Date: 11/08/2000 11:48:41
[ I'm CC'ing this to tech-toolchain because it really belongs there. ]

On Thu, Nov 09, 2000 at 04:16:24AM +0900, Hiroyuki Bessho wrote:

 > Previously I wrote NetBSD/sh3's ELF support is incomplete.  Here is my
 > proposal of fix.
 > sys/sys/cdefs_elf.h has a code segment as follows:
 >     #if defined(__sh3__)
 >     #define	_C_LABEL(x)	__CONCAT(_,x)
 >     #else
 >     #define	_C_LABEL(x)	x
 >     #endif
 > This is because egcs puts underscores ('_') to C labels when object
 > format is ELF for SH.  For other CPUs, underscores are not prepended
 > for ELF object format.  I don't know why they do it in this manner.

...err, this seems broken.  ELF is ELF, and as far as I know, the ELF
spec says "no prepending underscores".

 > It seems to me that keeping consistent with other ports and not having
 > prefix to C label is better and easier solution.  I haven't tried to
 > build the tree with such egcs configuration yet, but by quick research
 > on LinuxSH mailing list, I found they have their own configuration not
 > to put underscores to C label for SH3 ELF.

...sacarily enough, I'm in complete agreement with Linux on this one.

        -- Jason R. Thorpe <>