This is the mail archive of the cygwin-apps@cygwin.com 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]

Re: .rdata section in Cygwin executables?


On Friday 12 March 2004 15:51, Egor Duda wrote:
> Joe Buehler wrote:
> > The emacs recompile fails because there is a section in
> > the initially built emacs.exe named ".rdata" that the
> > unexec() code for Cygwin is not expecting.  The section
> > appears to have something to do with exception handling
> > and is only 1k in size.
>
> .rdata is a section where read-only data, such as constants, is stored.
> Most modern OSes and toolchain try to put as much info as possible to
> read-only segments of binary image because it reduce memory required by
> programs to run (when program is fork()ed, for instance, read-only pages
> may be shared between processes)

In case of using gcc 3.3x and using auto-imported vars, you should use the 
'-fdata-sections' flags for compiling sources because otherwise these 
variables are not detected as variables. See 
http://sources.redhat.com/ml/binutils/2003-10/msg00256.html for more infos. 

Just a note. 

Ralf 


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