Subject: Re: arm26 compiler fun
To: Simon Burge <>
From: Richard Earnshaw <>
List: tech-toolchain
Date: 05/15/2000 09:56:39
> Ben Harris wrote:
> > On Mon, 8 May 2000, Richard Earnshaw wrote:
> > 
> > > In ELF the default is normally to not prefix user symbols with '_', so 
> > > this would put mcount in user space.  You should look at other targets and 
> > > see what they do.
> > 
> > There seem to be two approaches. Most ELF ports have an assembly _mcount
> > which calls a C mcount.  i386 ELF has an assembly __mcount which calls a C
> > _mcount.  The former seems wrong to me, as the C function is in the user's
> > namespace, so unless people object, I shall follow i386.
> Without looking at the specifics, remember that as Richard says a.out
> prepends an _ to names, whilst ELF doesn't.  While this is usually
> hidden by the _C_LABEL macro, it could be that the i386 has this
> hard-coded in the old a.out way...

I agree with Ben: unless Posix or the NetBSD manpages mandate that mcount 
is a user-visible function (unlikely IMO), I think it should go in the 
reserved namespace.