Path: utzoo!attcan!uunet!mcvax!np1!nikhefh!t68 From: t68@nikhefh.hep.nl (Jos Vermaseren) Newsgroups: comp.sys.atari.st Subject: Re: GEMDOS bug running fully relocatable programs ? Message-ID: <536@nikhefh.hep.nl> Date: 5 Sep 88 09:07:15 GMT References: <8809022127.AA12529@ucbvax.Berkeley.EDU> Reply-To: t68@nikhefh.hep.nl (Jos Vermaseren) Organization: Nikhef-H, Amsterdam (the Netherlands). Lines: 25 What you have been doing is setting the 'no-relocation' word in the program header (bytes 26 and 27 in the program file). When this word is nonzero closing the file and clearing the bss are skipped. The old program relmod.ttp (or relmod.prg) messed things up, because it didn't recognize fully relocatable programs. The first entry in the relocation table should be a long and if there is no more relocation the relocator expects a zero (byte). Your problem is solved if you zero the relocation word in the job header and make sure that the relocation table at the end of your program is a long zero. As far as I understand from earlier postings of Allan Pratt he has fixed things. He mentioned the problem specifically. By the way: it is not only relmod that made this mistake, there are other, even brand new programs that have the same mistake. So it seems to me that the most intelligent response of the loader to a relocation table with only one byte would be to skip relocation if this byte is zero, but don't give an error message. There is a Pascal compiler (Kettler TeX was done with it) that even forgets the zero at the end of the relocation table. Amazingly enough the loader doesn't crash on it, it thinks that everything is fine. I guess that Allan Pratt knows about this though. Jos Vermaseren T68@nikhefh.hep.nl