This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Need information about data and bss segment address access in cygwin

   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

Can anyone through some light on where these variables are actually
declared and how they get the running process segment addresses.

Thanks in advance

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]