myxm@beta.UUCP (Mike Mitchell) (06/13/87)
I have been working on compiling Minix sources under DOS with a combination of the new Turbo C compiler and Microsoft Macro Assembler V3.0. I get to the point where I can link with a library of routines for Minix but when I run dos2out, it tells me the number of relocation items in the table is greater than one. Inspection with Norton Utils at the magic locations tells me that there are two items for relocation. So that is the problem, but what does one tell MASM in order to decrease this count by one? The library I have created is based on the small memory model which conforms to the separate I&D space model supported by Minix. I do not have any problems through the linking stage. But, I kind of have a gut level feeling that the two items for relocation are the code segment and the data segment. Is there any way to fake out the linker or a nifty trick that can be done in crtso.asm in order to get around this problem? Any insight into this problem would greatly be appreciated. Thank you Mike Mitchell myxm@lanl.gov {backbone}!cmcl2!lanl!myxm
myxm@beta.UUCP (Mike Mitchell) (06/13/87)
I have also attempted to compile a program containing long integers, and received complaints that the library which I created did not contain routines for performing int to long conversions as well as other long functions (whew). No problem, just extract the long routines from the Turbo C library and use those... But now the number of items in the relocation table of the exe file is 14! dos2out absolutely refuses to do anything about this. Ideas anyone? Thanks Mike Mitchell myxm@lanl.gov {backbone}!cmcl2!lanl!myxm
ddl@husc6.UUCP (Dan Lanciani) (06/13/87)
In article <6251@beta.UUCP>, myxm@beta.UUCP (Mike Mitchell) writes: > > I have also attempted to compile a program containing long integers, and > received complaints that the library which I created did not contain > routines for performing int to long conversions as well as other long > functions (whew). > > No problem, just extract the long routines from the Turbo C library > and use those... But now the number of items in the relocation table > of the exe file is 14! dos2out absolutely refuses to do anything about > this. Turbo C insists on generating far calls to all the "helper" routines, even in small model. However, if you compile in TINY model (-mt), it will generate a push of the code segment followed by a short call. While vaguely distressing from an efficiency point-of-view, this will let you do what you want. Of course, you could also compile small model to assembly code, run an editor script to change the sense of the calls, and assemble with MASM. Don't forget to patch up the library code to use near returns though... Dan Lanciani ddl@harvard.*