This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Need information about data and bss segment address access in cygwin
- From: Sudhahar <jsudha80 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 20 Jan 2006 16:38:25 +0530
- Subject: Need information about data and bss segment address access in cygwin
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/