Subject: Re: arm26 compiler fun
To: Richard Earnshaw <rearnsha@arm.com>
From: Ben Harris <bjh21@netbsd.org>
List: tech-toolchain
Date: 05/14/2000 19:25:51
On Mon, 8 May 2000, Richard Earnshaw wrote:
> #undef FUNCTION_PROFILER
> #define FUNCTION_PROFILER(STREAM,LABELNO)
> \
> {
> \
> fprintf(STREAM, "\tmov\t%sip, %slr\n", REGISTER_PREFIX,
> REGISTER_PREFIX); \
> fprintf(STREAM, "\tbl\tmcount\n");
> \
> }
>
> 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.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>