From owner-freebsd-current@FreeBSD.ORG Fri Feb 23 06:20:41 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03A1E16A401 for ; Fri, 23 Feb 2007 06:20:41 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id B7F8713C461 for ; Fri, 23 Feb 2007 06:20:40 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan@localhost [127.0.0.1]) by dan.emsphone.com (8.14.0/8.13.8) with ESMTP id l1N5hLgE046464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 22 Feb 2007 23:43:22 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.0/8.14.0/Submit) id l1N5hLUI046459; Thu, 22 Feb 2007 23:43:21 -0600 (CST) (envelope-from dan) Date: Thu, 22 Feb 2007 23:43:21 -0600 From: Dan Nelson To: Giorgos Keramidas Message-ID: <20070223054321.GB43770@dan.emsphone.com> References: <76EBE649FB0E0E4DA883B5840459059F143A182705@AA-EXMSG-C412.southpacific.corp.microsoft.com> <20070223010358.GA4946@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070223010358.GA4946@kobe.laptop> X-OS: FreeBSD 6.2-STABLE User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Mayank Kumar , freebsd-current@freebsd.org Subject: Re: what does _eprol mean and how is it compututed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2007 06:20:41 -0000 In the last episode (Feb 23), Giorgos Keramidas said: > On 2007-02-22 04:20, Mayank Kumar 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//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