RE: what does _eprol mean and how is it compututed

From: Mayank Kumar <mayank_at_microsoft.com>
Date: Fri, 23 Feb 2007 17:47:40 +0800
Hi Dan,
Cool, thnks for the information. That's exactly what I was looking for. But the cvs webaccess shows me crt0.c which actually contains _eprol and _etext. Anyways I now understand what eprol means.

Thanks
Mayank


-----Original Message-----
From: Dan Nelson [mailto:dnelson_at_allantgroup.com]
Sent: Friday, February 23, 2007 11:13 AM
To: Giorgos Keramidas
Cc: Mayank Kumar; freebsd-current_at_freebsd.org
Subject: Re: what does _eprol mean and how is it compututed

In the last episode (Feb 23), Giorgos Keramidas said:
> On 2007-02-22 04:20, Mayank Kumar <mayank_at_microsoft.com> wrote:
> > While calling monstartup in crt0.c, _eprol and _etext are passed to
> > monstartup.  _etext means end of segment, what does _eprol mean and
> > how is it computed
>
> Are you sure you are talking about FreeBSD?
>
>   build_at_kobe:/home/build/src$ egrep -r -e '_eprol|_etext' *
>   build_at_kobe:/home/build/src$
>
> I don't see any reference to '_eprol' or '_etext' in our source tree,
> and 'monstartup' doesn't really ring any bells.

It's actually "eprol" and "etext", and the source file is crt1.c,
located at /usr/src/lib/csu/<arch>/crt1.c .  The monstartup function
has a manpage that describes its arguments.  eprol is declared via some
__asm__() code in crt1.c to ensure that it's the first symbol in
gcrt1.o's text segment, which ensures that it's the first symbol in a
program's text segment (since gcrt1.o is the first thing linked into a
profiled binary).

--
        Dan Nelson
        dnelson_at_allantgroup.com
Received on Fri Feb 23 2007 - 08:47:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:05 UTC