X-Spam-Check-By: sourceware.org
Message-ID: <46ca01fa0601200345h788d0de8v39236e1d46c6a219@mail.gmail.com>
Date: Fri, 20 Jan 2006 17:15:17 +0530
From: Sudhahar <jsudha80@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Need information about data and bss segment address access in cygwin
In-Reply-To: <SERRANOng8FSZDhd2st00000235@SERRANO.CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
References: <46ca01fa0601200308r100244eerd9fc2ce933af6f51@mail.gmail.com> 	 <SERRANOng8FSZDhd2st00000235@SERRANO.CAM.ARTIMI.COM>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k0KBjbEu012275

Thanks Dave your reply answered the question where they declared. But
how does these variables get the segment address of data and bss for a
running process to make a copy to the child process? This is the
questions which is a puzzle to me.

Thanks in Advance for your answer
Sudha

On 1/20/06, Dave Korn <dave.korn@artimi.com> wrote:
> Sudhahar wrote:
>
> > from parent process to child process. After trying to find where the
> > data_start and data_end get the address of running process data and
> > bss segment, I ended up with a declaration  of
> >
> > extern char _data_start__, _data_end__, _bss_start__, _bss_end__; in
> > file Winsup.h
> >
> > There is no other place where _data_start__, _data_end__,
> > _bss_start__, _bss_end__ are defined they act as external symbols for
> > cygwin.
> >
> > Can anyone through some light on where these variables are actually
> > declared and how they get the running process segment addresses.
>
>   They are generated by the linker.  Take a look at the linker script by
> running "ld --verbose".
>
> dk@espanola /usr/build/src-binutils/bfd> ld --verbose  | grep _start
>      to include this between __data_start__ and __data_end__, but that
>     __data_start__ = . ;
>     __bss_start__ = . ;
>     ___crt_xc_start__ = . ;
>     ___crt_xi_start__ = . ;
>     ___crt_xl_start__ = . ;
>     ___crt_xp_start__ = . ;
>     ___crt_xt_start__ = . ;
>     ___tls_start__ = . ;
> dk@espanola /usr/build/src-binutils/bfd> ld --verbose  | grep _end
>      to include this between __data_start__ and __data_end__, but that
>      ".data_cygwin_nocopy" and explictly include it after __data_end__. */
>     __data_end__ = . ;
>     __bss_end__ = . ;
>     ___crt_xc_end__ = . ;
>     ___crt_xi_end__ = . ;
>     /* ___crt_xl_end__ is defined in the TLS Directory support code */
>     ___crt_xp_end__ = . ;
>     ___crt_xt_end__ = . ;
>     ___tls_end__ = . ;
>     PROVIDE ( _end = .);
>      __end__ = .;
> dk@espanola /usr/build/src-binutils/bfd>
>
>
>     cheers,
>       DaveK
> --
> Can't think of a witty .sigline today....
>
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


