Path: utzoo!attcan!uunet!mcvax!cernvax!ethz!pasche From: pasche@ethz.UUCP (Stephan Pasche) Newsgroups: comp.os.os9 Subject: Re: loading executable modules Message-ID: <567@ethz.UUCP> Date: 6 Aug 88 14:02:30 GMT References: <8808031814.AA27853@jade.berkeley.edu> Reply-To: pasche@bernina.UUCP (Stephan Paschedag) Organization: ETH Zuerich, Switzerland Lines: 41 Hi, The OS-9 utility 'load' just executes the system call F$Load to get the module to memory. F$Load has the following function : 1. open the file 2. check permissions 3. allocate memory for the module 4. load modules from file to memory 5. add a new entry to the module directory If the file contains more than one module, all modules are loaded into memory. The file must belong to the user or must have public read permission, if the file is located in the execution directory it must have execution permission. The module you want to load must belong to you or its module permissions be set for legal access for you. The memory is allocated at the highest possible physical address. The module directory entry contains the following informations : MD$MPtr do.l 1 module pointer MD$Group do.l 1 Grp.Usr of owner MD$Static do.l 1 module group memory size MD$Link do.w 1 module link count MD$MChk do.w 1 module header checksum If the header checksum in module directory and in the module do not match, the module can not be linked/executed ! If you have a protected system, you can't write to the module directory from user state, only from supervisor state ! The first module in the file has a link count of 1. If the file contained more than one module, the modules can not be removed from memory and module directory, because they are not loaded to memory each at 16byte boundary (minimum memory allocation size). ============================================================================== OS/2 & PS/2 : half an operating system for half a computer Stephan Paschedag paschedag@strati.ethz.ch or pasche@ifi.ethz.ch Federal Institute Of Technology Zurich ______________________________________________________________________________