|
From: Olsson Lars-E. <lar...@sc...> - 2007-03-30 07:06:22
|
Thank you for your answer. I took your advice and removed the "const" using a "define". It is the easiest way to maintain and understand for others.=20 Lars Erik=20 -----Original Message----- From: min...@li... [mailto:min...@li...] On Behalf Of Brian Dessent Sent: den 29 mars 2007 10:26 To: MinGW Users List Subject: Re: [Mingw-users] Making the .rdata segment writable > Olsson Lars-Erik wrote: > I am building a DLL and I want to make the .rdata segment writable to=20 > be able to change the variable values in this segment during an=20 > automatic testing process. After spent some days searching for a=20 > solution I now ask this forum how to do this. I think this sounds like an extremely bad idea. You could probably do it by modifying the stock linker script (lib/ldscripts/i386pe.x) to put .rdata in the .data output section instead of in .rdata. If that doesn't work you'd probably have to edit the source (emultempl/pe.em).=20 Even then there's a good chance the read-only-ness of any section named rdata is enforced by the operating system, so it wouldn't work just to remove the SEC_READONLY flag, although that's pure speculation on my part. Again, this sounds like an absolutely awful way to accomplish whatever it is that you're trying to do -- a hammer is not a screw driver, use your tools as they were designed, etc. Wouldn't it be a whole lot easier to just remove "const" from the variable's declaration? Brian ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ MinGW-users mailing list Min...@li... You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users |