delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/20/06:08:34

X-Spam-Check-By: sourceware.org
Message-ID: <46ca01fa0601200308r100244eerd9fc2ce933af6f51@mail.gmail.com>
Date: Fri, 20 Jan 2006 16:38:25 +0530
From: Sudhahar <jsudha80 AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Need information about data and bss segment address access in cygwin
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k0KB8WdD004829

Hi,
   I'm trying to understand how Cygwin implement fork in windows. When
I browse through the fork code I found Cygwin copies the data
segment,bss segment etc as
rc = fork_copy (pi, "user/cygwin data",
          user_data->data_start, user_data->data_end,
          user_data->bss_start, user_data->bss_end,
          cygheap->user_heap.base, cygheap->user_heap.ptr,
          stack_here, ch.stackbottom,
          dll_data_start, dll_data_end,
          dll_bss_start, dll_bss_end, impure_beg, impure_end, NULL);

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.

Thanks in advance
Sudha

--
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019