Writeable code sections got you down? Fear no more!

转载 2011年01月11日 10:29:00

Virtual Memory changes included in Windows Mobile 6.1 can relocate read-only code sections out of Slot 0 and into a higher address range. This change was taken to relieve pressure from our coveted, read-write Slot 0. This change will be transparent to most developers since code sections are by default, read-only and do not assume code sections will be adjacent.

 

However, if you are intentionally including the “W” (write) attribute on a code section and your DLL is greater than 64kb, then you may be affected. Luckily, dumpbin.exe already knows to display a warning:

 

C:/WM612/release>dumpbin myDll.dll

 

60000020 flags

         Code

         Execute Read

 

DUMPBIN : warning LNK4078: multiple '.text' sections found with different attributes (E0000020)

 

SECTION HEADER #2

E0000020 flags

         Code

         Execute Read Write

 

There is nothing programmatically wrong with the above and most modules will work without modification. However, if you are seeing some strange results in recent versions of Windows Mobile, you may want to try and restrict your module to Slot 0 by adding the following registry key:

 

[HKEY_LOCAL_MACHINE/System/Loader/LoadModuleLow]

    "MyDll.dll"=dword:1  << change DLL name to match

 

Please note that using the above key will force your entire module into Slot 0 and prevent other modules from loading in that slot. The above registry setting should be used with caution and only for modules with a writeable code section.

相关文章推荐

解决PhotoView的报错信息:ImageView no longer exists. You should not use this PhotoViewAttacher any more.

PhotoView经常弹出以下异常信息:ImageView no longer exists. You should not use this PhotoViewAttacher any more.解...

配置OpenStack的glance出现错误Failed to show index. Got error: You are not authenticated.

首先感谢陈沙克先生写出了这么好的博客,为我们OpenStack的新手提供了许多便利,陈先生的博客地址:http://www.chenshake.com/ubuntu-12-04-openstack-e...

Bliss is without a doubt, everyday life hasn't got to help you normally fright

Bliss is without a doubt, everyday life hasnt got to help you normally fright. Within beginning the ...

robbin的自白:You've got to find what you love

robbin的自白:You've got to find what you love 博客分类: 创业 杂感 互联网创业 《You've got to find what y...

【codeforces】2014 Asia Xian Regional Contest G The Problem to Slow Down You 【Palindromic Tree】

传送门:【codeforces】2014 Asia Xian Regional Contest G The Problem to Slow Down You 【Palindromic Tree】 ...

Android无法启动AVD解决方法出现"The connection to adb is down...You must restart adb and Eclipse."

Android无法启动AVD解决方法出现"The connection to adb is down...You must restart adb and Eclipse." 出现的错误信息具体如下:...
  • qiu_11
  • qiu_11
  • 2013年11月14日 17:47
  • 1435

121.After performing a clean shut down of the database instance for maintenance, you mount the datab

121.After performing a clean shut down of the database instance for maintenance, you mount the datab...

启动Genymotion模拟器时,显示The virtual device got no IP address

如下图所示 我也弄了好久,最后是在stackoverflow上找到了答案 首先打开Virtualbox  ,设置--->常规--->找到版本  将Ubuntu (32-bit) 修改成Ubu...

Genymotion模拟器常见问题——Unable to start the virtual device,The virtual device got no IP address

启动Genymotion直接报错这个,尝试了重装Genymotion,重新设置VirtualBox的IP,然而并没有什么卵用。 后来在stackoverflow上找到了一个方法,但不能保...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Writeable code sections got you down? Fear no more!
举报原因:
原因补充:

(最多只允许输入30个字)