X-Spam-Check-By: sourceware.org Message-ID: <43D0D06C.3010906@hones.org.uk> Date: Fri, 20 Jan 2006 11:58:36 +0000 From: Cliff Hones User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Need information about data and bss segment address access in cygwin References: <46ca01fa0601200308r100244eerd9fc2ce933af6f51 AT mail DOT gmail DOT com> <46ca01fa0601200345h788d0de8v39236e1d46c6a219 AT mail DOT gmail DOT com> In-Reply-To: <46ca01fa0601200345h788d0de8v39236e1d46c6a219@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Sudhahar wrote: > 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. The linker places these variables at the start and end of the data and bss segments. The application can then find the addresses of the segments by taking the address of the variables (eg &__data_start__). They aren't strictly variables in the C sense, inasmuch as trying to read or assign to them may corrupt your application or cause a segmentation error. Look in winsup/cygwin/lib/_cygwin_crt0_common.cc -- Cliff -- 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/