eyal@cancol.oz (Eyal Lebedinsky) (05/06/90)
Hello again A short while ago I reported my experiences with cross compiling with msc5.1; I had tools/menu fall over. After close inspection it turned out that the declaration of the external variables in menu1.s did not pu them in DGROUP but in _TEXT. This caused the wrong address to be picked up just before calling the kernel. The solution is to add .bss or .data at the start of the program before the .extern of relevant symbols, otherwise all symbols are assumed to be in .text (the mode the assembly start in by default). I see it as a problem with menu1.s which one is lucky to get away with using asld, I am not sure how the TC users fair here (Any comments from those people? Earl?). Now there is the last proble, where login.c falls over after reading the userid. At that point the system is up, the file-systems mounted etc. This is a harder one because there could be influence from the four .s modules in kernel and those are too big for easy debugging. I would appreciate any help here. -- Regards Eyal
cechew@bruce.OZ (Earl Chew) (05/07/90)
>the kernel. The solution is to add .bss or .data at the start of the program >before the .extern of relevant symbols, otherwise all symbols are assumed to >be in .text (the mode the assembly start in by default). I see it as a problem >with menu1.s which one is lucky to get away with using asld, I am not sure how >the TC users fair here (Any comments from those people? Earl?). I have had this happen before. Usually I get a fix-up error from the linker. If you make the executable comi&d the problem goes away :-) It seems that asld is very forgiving about where you can and cannot declare such things. Masm and Tasm are not. I don't think that a sed script such as s2asm could figure out enough to fix this problem so it's up to us. In general, it is wise to put the .extern after the appropriate .bss, .data or .text. I think that Bruce is quite good at doing this --- others don't seem to be aware of the problem. Try remaking as comi&d if you suspect this problem. Earl -- Earl Chew, Dept of Computer Science, Monash University, Australia 3168 ARPA: cechew%bruce.cs.monash.oz.au@uunet.uu.net ACS : cechew@bruce.oz ----------------------------------------------------------------------