Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!topaz!uwvax!ericf From: ericf@uwvax.UUCP (Eric Feigenson) Newsgroups: net.micro,net.micro.16k,net.micro.pc Subject: Re: MS-DOS object code format Message-ID: <678@uwvax.UUCP> Date: Tue, 4-Mar-86 10:39:14 EST Article-I.D.: uwvax.678 Posted: Tue Mar 4 10:39:14 1986 Date-Received: Wed, 5-Mar-86 06:27:27 EST References: <549@imag.UUCP> Organization: U of Wisconsin CS Dept Lines: 33 Keywords: MS-DOS, object code, linker input Xref: watmath net.micro:13968 net.micro.16k:441 net.micro.pc:7282 Summary: Experience with MS-DOS object file formats While someone is looking for a reference to MS-DOS object file formats... I recently was trying to analyze the .OBJ files under MS-DOS. I got the "8086 Relocatable Object Module Formats" document from Intel (Order number 121748-001) to aid me in my quest. However, there seems to be a critical difference in the .OBJ format described in the document, and the .OBJ files I found generated by the Microsoft C Compiler. It's been a while (I got frustrated, and gave up for a while), but the gist of the difference is the following: There are two record types in an object module that describe global data, EXTDEF (for globals referenced in the module, but not allocated space there) and PUBDEF (for globals defined in the module). What I found was that there were symbols that were defined in the module (i.e., space was allocated for them there) that appeared in EXTDEF records (which implies that they were *not* allocated in the module, and the linker would need to find the module where the symbols *are* defined). Since I am mainly trying to find out what symbols are external vs. public in a module, this is a very annoying situation. Can anyone shed any light on this? Have I overlooked something? Is the Intel document describing something different than is dealt with with the Microsoft C Compiler and Linker? Could a global symbol appear in an EXTDEF *and* PUBDEF record? If necessary, I can produce a .OBJ that exhibits this problem (no really, it does happen... I'm *not* crazy...) Thanks! -- -Eric Feigenson Usenet: {seismo, allegra, ihnp4}!uwvax!ericf Arpanet: ericf@wisc-rsch.arpa