Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!nbires!hao!oddjob!uwvax!rutgers!mit-eddie!genrad!decvax!tektronix!reed!psu-cs!mmason From: mmason@psu-cs.UUCP (Mark C. Mason) Newsgroups: comp.os.minix Subject: Re: Compiling under MSC Message-ID: <428@psu-cs.UUCP> Date: Wed, 29-Jul-87 17:55:31 EDT Article-I.D.: psu-cs.428 Posted: Wed Jul 29 17:55:31 1987 Date-Received: Sat, 1-Aug-87 11:16:07 EDT References: <1139@cognos.UUCP> Reply-To: mmason@psu-cs.UUCP (Mark C. Mason) Organization: Dept. of Computer Science, Portland State University; Portland OR Lines: 36 In article <1139@cognos.UUCP> brianc@cognos.uucp (Brian Campbell) writes: > > Has anyone gotten any further with using Microsoft C as a >cross-compiler for Minix? [Are you there mmason?] I've gotten as far My apologies. I'm currently swamped at both work and home, and haven't had time to work on the cross compiler. There appear to be several others who have succeeded in the past 2-3 weeks, and have posted their findings. >there are problems. One simple problem was the resolution of a global >variable 'M'. There is a file 'message.c' that does nothing except >define and export this variable. The linker I'm using doesn't resolve >references to data properly and doesn't pick up this file. Is there any >reason why M can't be (or isn't) defined in call.c? [In the interim I'm In most versions of MSC (including the XENIX C compiler/linker) there is a bug whereby if a file contains nothing but an *UNINITIALIZED* declaration, and the object file is in a library (xenix or dos), the variable won't be visible to the linker. The work-around is to initialize the variable (M in this case) to something in the declaration. > Another problem is with the way the linker combines segments. I've >got all the segment names right (I think), but the linker always gets >the locations for endtext, enddata and endbss wrong -- they get stuck Most of my time was spent resolving this. Someone recently posted a description of how this should be done (but I've lost the article). >Brian Campbell uucp: decvax!utzoo!dciem!nrcaer!cognos!brianc >Cognos Incorporated mail: 3755 Riverside Drive, Ottawa, Ontario, K1G 3N3 >(613) 738-1440 fido: sysop@163/8 Mark C. Mason ...!tektronix!psu-cs!mmason mmason@cs.pdx.edu