This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: gcc 3.3.3 builds "corrupt" lesstif-0.93.94
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: cygwin-apps <cygwin-apps at cygwin dot com>
- Date: Sun, 24 Oct 2004 14:43:24 +1300
- Subject: Re: gcc 3.3.3 builds "corrupt" lesstif-0.93.94
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
Charles Wilson wrote:
> The other question is, how is the ".rdata is read only, you can't
change
> anything there" enforced? By whom? Is this something about the pei-x86
> format that is enforced by the Windows Runtime Loader, or is it simply
a
> convention enforced by our startup objects (crt0.o etc)? If it's the
> latter, then surely we can fix that ("Okay, it's read-only AFTER the
> pseudo-reloc fixups are done").
Back before .rdata was enabled for user data in GCC, const data was
put into ,text, which is normally readonly as well. But this, in
pe-dll.c:pe_create_import_fixup
line 2178
/* If we ever use autoimport, we have to cast text section
writable. */
config.text_read_only = FALSE;
output_bfd->flags &= ~WP_TEXT
allowed it to work. .
So checking one or both of these flags provides info on whether
we might also need to make .rdata writeable.
Me? I would just do something simple like mark the problematic data as
dllimport. I don't
like the idea of making .text writeable, let alone .rdata
Danny
--
> Chuck