OMF(Object Module Format) length field appears incorrect

丶灬走出姿态 提交于 2019-12-11 08:01:33

问题


I am a little confused, with the PUBDEF record in the OMF object format. My assembler has generated a result which states the record is 4000 bytes, when it clearly is not so why would it do this?

Image of Hex view of OMF

The 0xa0 and 0x0f is the record length in little endian format,

please view the specificaiton: http://pierrelib.pagesperso-orange.fr/exec_formats/OMF_v1.1.pdf

It also appears to state that the strings are zero bytes in length and at one point even has just a zero string length with no string provided. Maybe I am reading the file wrong? I have spent hours now and am struggling.

If anyone can help me with my issue as I am writing a linker and cannot continue without understanding this.

Thanks


回答1:


There is no PUBDEF record in the file. You seem to have miscalculated the previous record size:

0000:80 THEADR
000e:88 CoMENT
0032:96 LNAMES
0041:98 SEGDEF
004B:98 SEGDEF
0055:88 COMENT
005C:a0 LEDATA
006E:a0 LEDATA
007b:8a MODEND

Learn to use more sofisticated tools for OMF inspection, such as Tdump.exe or ODU.exe.



来源:https://stackoverflow.com/questions/41022380/omfobject-module-format-length-field-appears-incorrect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!