⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 00000023.htm

📁 水木社区 embeded 版精华区 下载
💻 HTM
📖 第 1 页 / 共 2 页
字号:
&nbsp;描述&nbsp;<br />.text&nbsp;<br />&nbsp;代码&nbsp;<br />.rsrc&nbsp;<br />&nbsp;资源数据&nbsp;<br />.data&nbsp;<br />&nbsp;数据&nbsp;<br />.pdata&nbsp;<br />&nbsp;在代码部分每个函数的调试和异常处理信息&nbsp;<br />.CRT&nbsp;<br />&nbsp;特殊部分——C++结构&nbsp;<br />.KDATA&nbsp;<br />&nbsp;特殊部分——仅出现在核心当中(Nk.exe)&nbsp;<br />Romimage是一个命令行工具。从一个典型的Romimage部分输出的头几行包括:程序的标&nbsp;<br />题、页面大小和MODULES部分的起始位置等。&nbsp;<br />Windows&nbsp;CE&nbsp;ROM&nbsp;Image&nbsp;Builder&nbsp;&nbsp;v1.0&nbsp;&nbsp;Copyright&nbsp;Microsoft&nbsp;1995.&nbsp;<br />Copying&nbsp;d:\WINCE\release\odo2bpp.dll&nbsp;to&nbsp;d:\WINCE\release\ddi.dll&nbsp;for&nbsp;debugge&nbsp;<br />r.&nbsp;<br />Copying&nbsp;d:\WINCE\release\odo2bpp.pdb&nbsp;to&nbsp;d:\WINCE\release\ddi.pdb&nbsp;for&nbsp;debugge&nbsp;<br />r.&nbsp;<br />Setting&nbsp;PageSize&nbsp;to&nbsp;1024&nbsp;<br />DumpSymbols:&nbsp;pTOC&nbsp;found&nbsp;at00000e50&nbsp;<br />MODULES&nbsp;Section&nbsp;<br />Module&nbsp;<br />&nbsp;Section&nbsp;<br />&nbsp;Start&nbsp;<br />&nbsp;Length&nbsp;<br />&nbsp;psize&nbsp;<br />&nbsp;vsize&nbsp;<br />&nbsp;Filler&nbsp;<br />nk.exe&nbsp;<br />&nbsp;.text&nbsp;<br />&nbsp;8c600400h&nbsp;<br />&nbsp;116736&nbsp;<br />&nbsp;116736&nbsp;<br />&nbsp;116268&nbsp;<br />nk.exe&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8c61cc00h&nbsp;<br />&nbsp;4096&nbsp;<br />&nbsp;4096&nbsp;<br />&nbsp;3864&nbsp;<br />coredll.dll&nbsp;<br />&nbsp;.text&nbsp;<br />&nbsp;8c61dc00h&nbsp;<br />&nbsp;119808&nbsp;<br />&nbsp;119296&nbsp;<br />&nbsp;118987&nbsp;<br />coredll.dll&nbsp;<br />&nbsp;.rsrc&nbsp;<br />&nbsp;8c63b000h&nbsp;<br />&nbsp;1024&nbsp;<br />&nbsp;1024&nbsp;<br />&nbsp;528&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;在MODULES部分的第一个条目,Nk.exe&nbsp;,的大小为116268&nbsp;=&nbsp;0x1c62c字节。这个实&nbsp;<br />际的大小被扩大到下一个1024字节的边界上,116736&nbsp;=&nbsp;0x1c800,并且被放置到ROM中。&nbsp;<br />这便留下了一个468字节的“洞”,可以提供给其他文件使用。同样,在0x8c63b210地址&nbsp;<br />处有一个496字节的“洞”,它出现在Coredll.dll&nbsp;.rsrc&nbsp;部分的最后一个页面的末尾。&nbsp;<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;在放置完所有的.text(代码)部分后,Romimage开始将小于一页的数据部分放置到&nbsp;<br />这些“洞”中。例如,在稍后的MODULES部分中,相同的Romimage日志包含了下列信息:&nbsp;<br />&nbsp;<br />Module&nbsp;<br />&nbsp;Section&nbsp;<br />&nbsp;Start&nbsp;<br />&nbsp;Length&nbsp;<br />&nbsp;psize&nbsp;<br />&nbsp;vsize&nbsp;<br />&nbsp;Filler&nbsp;<br />coredll.dll&nbsp;<br />&nbsp;.data&nbsp;<br />&nbsp;8c61ca2ch&nbsp;<br />&nbsp;4&nbsp;<br />&nbsp;4&nbsp;<br />&nbsp;200&nbsp;<br />&nbsp;FILLER&nbsp;<br />coredll.dll&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8cb32800h&nbsp;<br />&nbsp;4868&nbsp;<br />&nbsp;4866&nbsp;<br />&nbsp;8064&nbsp;<br />filesys.exe&nbsp;<br />&nbsp;.data&nbsp;<br />&nbsp;8cb33b04h&nbsp;<br />&nbsp;12236&nbsp;<br />&nbsp;12234&nbsp;<br />&nbsp;21376&nbsp;<br />filesys.exe&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8cb36ad0h&nbsp;<br />&nbsp;2152&nbsp;<br />&nbsp;2149&nbsp;<br />&nbsp;2640&nbsp;<br />gwes.exe&nbsp;<br />&nbsp;.data&nbsp;<br />&nbsp;8cb37338h&nbsp;<br />&nbsp;10796&nbsp;<br />&nbsp;10794&nbsp;<br />&nbsp;17828&nbsp;<br />gwes.exe&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8cb39d64h&nbsp;<br />&nbsp;12456&nbsp;<br />&nbsp;12456&nbsp;<br />&nbsp;15768&nbsp;<br />device.exe&nbsp;<br />&nbsp;.data&nbsp;<br />&nbsp;8c61ca30h&nbsp;<br />&nbsp;213&nbsp;<br />&nbsp;213&nbsp;<br />&nbsp;276&nbsp;<br />&nbsp;FILLER&nbsp;<br />device.exe&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8c63b210h&nbsp;<br />&nbsp;341&nbsp;<br />&nbsp;341&nbsp;<br />&nbsp;424&nbsp;<br />&nbsp;FILLER&nbsp;<br />fatfs.dll&nbsp;<br />&nbsp;.data&nbsp;<br />&nbsp;8c659c84h&nbsp;<br />&nbsp;366&nbsp;<br />&nbsp;366&nbsp;<br />&nbsp;504&nbsp;<br />&nbsp;FILLER&nbsp;<br />fatfs.dll&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8cb3ce0ch&nbsp;<br />&nbsp;1324&nbsp;<br />&nbsp;1322&nbsp;<br />&nbsp;1624&nbsp;<br />shell.exe&nbsp;<br />&nbsp;.data&nbsp;<br />&nbsp;8cb3d338h&nbsp;<br />&nbsp;1608&nbsp;<br />&nbsp;1605&nbsp;<br />&nbsp;2864&nbsp;<br />shell.exe&nbsp;<br />&nbsp;.pdata&nbsp;<br />&nbsp;8c61cb05h&nbsp;<br />&nbsp;183&nbsp;<br />&nbsp;183&nbsp;<br />&nbsp;208&nbsp;<br />&nbsp;FILLER&nbsp;<br />Coredll.dll的第一个.data数据部分的大小是4字节,被放置在第一个可以使用的“洞”&nbsp;<br />中,0x8c600400&nbsp;+&nbsp;0x1c62c&nbsp;=&nbsp;0x8c61ca2c&nbsp;。它仅用了4个字节,将下一个要填充的地址&nbsp;<br />移动到0x8c61ca30并将该“洞”缩小为464字节。&nbsp;<br />下一个小于一页的.data数据部分是Device.exe的数据部分,它需要213&nbsp;=&nbsp;0xd5字节,而&nbsp;<br />且在第一个“洞”剩余的空间足够容纳它。它被放置到此处,将地址变为0x8c61cb05,&nbsp;<br />将该“洞”缩小为251字节。&nbsp;<br />device.exe&nbsp;&nbsp;&nbsp;.data&nbsp;&nbsp;&nbsp;&nbsp;8c61ca30h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;213&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;276&nbsp;FILLER&nbsp;<br />Device.exe的.pdata部分为341字节,比这个“洞”剩余的空间大,因此它被放置到另一&nbsp;<br />个“洞”——&nbsp;Coredll.dll资源部分最后一个页面上的“洞”,起始位置是0x8c63b210&nbsp;<br />。&nbsp;<br />device.exe&nbsp;&nbsp;&nbsp;.pdata&nbsp;&nbsp;&nbsp;8c63b210h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;341&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;341&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;424&nbsp;FILLER&nbsp;<br />接下来的.data或.pdata部分都比第一个“洞”剩余的251字节小,其中调试器命令解释&nbsp;<br />器Shell.exe的.data部分为183字节。它被放于第一个“洞”的下一个有效的起始地址0&nbsp;<br />x8c61cb05处。&nbsp;<br />shell.exe&nbsp;&nbsp;&nbsp;&nbsp;.pdata&nbsp;&nbsp;&nbsp;8c61cb05h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;208&nbsp;FILLER&nbsp;<br />Romimage工具按照这种方式继续工作直到所有的部分全都被放置好。任何剩下未被使用&nbsp;<br />的“洞”都被列在报告中:&nbsp;<br />Unfilled&nbsp;ROM&nbsp;Holes(Address,Length):&nbsp;<br />8c9cfbf8h&nbsp;<br />&nbsp;8&nbsp;8caef3f8h&nbsp;<br />&nbsp;8&nbsp;8cb253f8h&nbsp;<br />&nbsp;8&nbsp;8cb2bff8h&nbsp;<br />&nbsp;8&nbsp;<br />8c769bf9h&nbsp;<br />&nbsp;7&nbsp;8c8d4ffah&nbsp;<br />&nbsp;6&nbsp;8c8f37fah&nbsp;<br />&nbsp;6&nbsp;8c98dffah&nbsp;<br />&nbsp;6&nbsp;<br />8cb16ffah&nbsp;<br />&nbsp;6&nbsp;8cb1d7fah&nbsp;<br />&nbsp;6&nbsp;8cb327fah&nbsp;<br />&nbsp;6&nbsp;8c61dbfbh&nbsp;<br />&nbsp;5&nbsp;<br />8c6e6ffbh&nbsp;<br />&nbsp;5&nbsp;8c763ffbh&nbsp;<br />&nbsp;5&nbsp;8c855ffbh&nbsp;<br />&nbsp;5&nbsp;8c935bfbh&nbsp;<br />&nbsp;5&nbsp;<br />8c9877fbh&nbsp;<br />&nbsp;5&nbsp;8c7537fch&nbsp;<br />&nbsp;4&nbsp;8c765bfch&nbsp;<br />&nbsp;4&nbsp;8c7bcffch&nbsp;<br />&nbsp;4&nbsp;<br />8c7d3bfch&nbsp;<br />&nbsp;4&nbsp;8c80dbfch&nbsp;<br />&nbsp;4&nbsp;8c82f3fch&nbsp;<br />&nbsp;4&nbsp;8c8f27fch&nbsp;<br />&nbsp;4&nbsp;<br />8c938ffch&nbsp;<br />&nbsp;4&nbsp;8c9c17fch&nbsp;<br />&nbsp;4&nbsp;8c9e23fch&nbsp;<br />&nbsp;4&nbsp;8ca6e7fch&nbsp;<br />&nbsp;4&nbsp;<br />8cacfbfch&nbsp;<br />&nbsp;4&nbsp;8cb20bfch&nbsp;<br />&nbsp;4&nbsp;8c61cbfdh&nbsp;<br />&nbsp;3&nbsp;8c659ffdh&nbsp;<br />&nbsp;3&nbsp;<br />8c6e13fdh&nbsp;<br />&nbsp;3&nbsp;8c6e23fdh&nbsp;<br />&nbsp;3&nbsp;8c6e87fdh&nbsp;<br />&nbsp;3&nbsp;8c6ee7fdh&nbsp;<br />&nbsp;3&nbsp;<br />8c63b3feh&nbsp;<br />&nbsp;2&nbsp;8c74fffeh&nbsp;<br />&nbsp;2&nbsp;8c785ffeh&nbsp;<br />&nbsp;2&nbsp;8c7b8ffeh&nbsp;<br />&nbsp;2&nbsp;<br />8c7c23feh&nbsp;<br />&nbsp;2&nbsp;8c9717feh&nbsp;<br />&nbsp;2&nbsp;8c99d7feh&nbsp;<br />&nbsp;2&nbsp;8cb09ffeh&nbsp;<br />&nbsp;2&nbsp;<br />8cb227feh&nbsp;<br />&nbsp;2&nbsp;8c63afffh&nbsp;<br />&nbsp;1&nbsp;8c65a3ffh&nbsp;<br />&nbsp;1&nbsp;8c6ea7ffh&nbsp;<br />&nbsp;1&nbsp;<br />8c788fffh&nbsp;<br />&nbsp;1&nbsp;8c793fffh&nbsp;<br />&nbsp;1&nbsp;8c9727ffh&nbsp;<br />&nbsp;1&nbsp;8c9a8bffh&nbsp;<br />&nbsp;1&nbsp;<br />8ca83bffh&nbsp;<br />&nbsp;1&nbsp;8cacf7ffh&nbsp;<br />&nbsp;1&nbsp;8cb047ffh&nbsp;<br />&nbsp;1&nbsp;8cb0bfffh&nbsp;<br />&nbsp;1&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;识别FILLER部分的能力是十分重要的,因为执行体和DLLs的大小和数量对于不同的&nbsp;<br />配置有所不同。这将影响可使用的“洞”的大小,并影响所需的全部内存量。&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;要确定每个模块的ROM使用情况,可以根据Romimage工具输出的该模块各部分的大小&nbsp;<br />计算出总和——并且除去那些作为填充“漏洞”的部分。因为填充部分是被插入到可以&nbsp;<br />使用的“洞”中的,所以它不会增加该模块的内存需求量。&nbsp;<br />查看虚拟内存&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;使用Memtool工具可以查看每个虚拟内存页面。Memtool提供了对每个进程都有效的&nbsp;<br />32(MB)内存的一个完整映象。内存映象可以看出代码和数据是否在ROM或RAM。&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Memtool还可以显示出当前堆栈使用情况的摘要。堆栈的大小可以根据需要动态增大&nbsp;<br />或缩小。显示出的堆栈数可能并不代表最大需求量。它们描述了堆栈在使用Memtool工具&nbsp;<br />检查时的状态。&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;例如,Filesys.exe进程内存映象的头几行显示了各种不同的用法。每个符号表示一&nbsp;<br />个内存页面并指示出该页面的使用情况:&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Memory&nbsp;usage&nbsp;for&nbsp;Process&nbsp;8c056d2c:&nbsp;'filesys.exe'&nbsp;pid&nbsp;1&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Slot&nbsp;base&nbsp;04000000&nbsp;&nbsp;Section&nbsp;ptr&nbsp;8cfe4c00&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;04000000(1):&nbsp;----------------------r------------------------------------&nbsp;<br />-----&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;04010000(0):&nbsp;-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC&nbsp;<br />CCCCC&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;04020000(0):&nbsp;CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC&nbsp;<br />CCCCC&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;04030000(0):&nbsp;CCCCCCCCCCWWWWWWWWWWWWWWWWWWWWW---R&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;04040000(0):&nbsp;-------------------------------------------------SSS----SSS&nbsp;<br />S&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;04050000(0):&nbsp;PPPPOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO&nbsp;<br />OOOOO&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;连字符(-)表示该页面被保留;小写r表示在RAM中的数据;大写C表示ROM中的代码;&nbsp;<br />大写W表示在RAM中的可读/写数据;大写R表示ROM中的数据;大写S表示堆栈;大写P表示&nbsp;<br />外围设备的内存(不能被核心分配但是可以被Gwes或设备驱动程序映射);大写O表示目&nbsp;<br />标存储设备。除了这些符号外,小写c表示正在RAM中执行的代码。&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;在内存映象后,Memtool工具显示了摘要信息。类似的信息还可以用Ppsh工具和MI命&nbsp;<br />令得到,这些信息显示如下:&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Memory&nbsp;usage&nbsp;for&nbsp;Process&nbsp;8c036d2c:&nbsp;'filesys.exe'&nbsp;pid&nbsp;1&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Slot&nbsp;base&nbsp;04000000&nbsp;&nbsp;Section&nbsp;ptr&nbsp;8c5e7000&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;Page&nbsp;summary:&nbsp;code=207(0)&nbsp;datar/o=2&nbsp;r/w=7&nbsp;stack=1&nbsp;reserved=13963&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;在页面摘要中,code后面的值表示ROM中的页面数。圆括号中的数字表示了RAM中的&nbsp;<br />页面数。数据页面中分别表示了只读或读/写页面数。Stack后面的值表示了堆栈所用的&nbsp;<br />页面数。&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;要得到其他微处理器和其他平台上的内存需求信息,可以使用ROM&nbsp;Image&nbsp;Builder、&nbsp;<br />Ppsh或Memtool工具来查看它们的输出信息。这些工具的完整文档可以在Microsoft&nbsp;Win&nbsp;<br />dows&nbsp;CE&nbsp;Embedded&nbsp;Toolkit&nbsp;for&nbsp;Visual&nbsp;C++?&nbsp;5.0中找到。&nbsp;<br /> &nbsp;<br />&nbsp;<br />--&nbsp;<br />※&nbsp;来源:·BBS&nbsp;水木清华站&nbsp;smth.org·[FROM:&nbsp;166.111.61.53]&nbsp;<br /><a href="00000022.htm">上一篇</a><a href="javascript:history.go(-1)">返回上一页</a><a href="index.htm">回到目录</a><a href="#top">回到页首</a><a href="00000024.htm">下一篇</a></h1></center><center><h1>BBS 水木清华站∶精华区</h1></center></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -