peter@atlas.abccomp.oz.au (Peter Barker) (05/31/91)
Does anyone know a source of information about the method used by linkers to store symbol information in .EXE files. I have done some snooping, but I cannot find the secret. Codeview and Turbo debugger use different formats, but I cannot find the details. The reason I want to know is that I am writing an overlay manager, using DOS function 4B03h (load overlay). I want to append some information to the overlay file so the program can read it, but have it ignored by the DOS load overlay function (4B03h). I originally assumed that the DOS loader obtained all its information about the contents of the file being loaded from the header at the start of the .EXE file. In this case I could append information to the end of the file, and the loader would ignore it, as it does with symbol information provided by the linker for CodeView. Unfortunately this is not the case - the file does not load correctly. Does anyone have any information about how symbolic information is stored in the .EXE by linkers? Please help if you have any idea, or suggestion of where some help may be found, as I am getting desperate. Thankyou, -- Peter Barker | Internet peter@atlas.abccomp.oz.au TurboSoft Pty Ltd | JANET peter%atlas.abccomp.oz.au@uk.ac.ukc 248 Johnston St, Annandale | UUCP uunet!munnari!atlas.abccomp.oz!peter NSW 2038 Australia | Telephone +(612) 552 1266
karlson@bonsai.Berkeley.EDU (Eric Karlson) (06/04/91)
I believe that you will find that there is a variable amount of space between the EXE header and the begining of the actual code in an EXE file. There is are fields in the header that indicates the size of the header, the size of the relocation table, the start of the relocation table and the start of the executable code. By properly manipulating these fields you can open up a space in the file following the header or relocation table which should be ignored by the EXE loader. I've never looked at my EXE files that have symbolic information in them, but I suspect that this is where it has to be. Eric Karlson