Date: Thu, 22 Feb 2007 23:43:21 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Giorgos Keramidas <keramida@ceid.upatras.gr> Cc: Mayank Kumar <mayank@microsoft.com>, freebsd-current@freebsd.org Subject: Re: what does _eprol mean and how is it compututed Message-ID: <20070223054321.GB43770@dan.emsphone.com> In-Reply-To: <20070223010358.GA4946@kobe.laptop> References: <76EBE649FB0E0E4DA883B5840459059F143A182705@AA-EXMSG-C412.southpacific.corp.microsoft.com> <20070223010358.GA4946@kobe.laptop>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 23), Giorgos Keramidas said: > On 2007-02-22 04:20, Mayank Kumar <mayank@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@kobe:/home/build/src$ egrep -r -e '_eprol|_etext' * > build@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@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070223054321.GB43770>