This is the mail archive of the 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: gcc 3.3.3 builds "corrupt" lesstif-0.93.94

Charles Wilson wrote:

> The other question is, how is the ".rdata is read only, you can't
> 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
> 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

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


> Chuck

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