def load_binary(self, ami_bin_file): self.bin_basename = self.ctx.path_mgr.ami_name_of_path(ami_bin_file) self.bin_file = ami_bin_file self.bin_seg_list = self.ctx.seg_loader.load_seg(ami_bin_file) if self.bin_seg_list == None: log_proc.error("failed loading binary: %s", self.ctx.seg_loader.error) return False self.prog_start = self.bin_seg_list.prog_start log_proc.info("loaded binary: %s", self.bin_seg_list) for seg in self.bin_seg_list.segments: log_proc.info(seg) return True
def load_binary(self, lock, ami_bin_file, shell=False): self.bin_basename = self.ctx.path_mgr.ami_name_of_path(lock,ami_bin_file) self.bin_file = ami_bin_file self.bin_seg_list = self.ctx.seg_loader.load_seg(lock,ami_bin_file) if self.bin_seg_list == None: log_proc.error("failed loading binary: %s", self.ctx.seg_loader.error) return False self.prog_start = self.bin_seg_list.prog_start # THOR: If this is a shell, then the seglist requires BCPL linkage and # initialization of the GlobVec. Fortunately, for the 3.9 shell all this # magic is not really required, and the BCPL call-in (we use) is at # offset +8 if shell: self.prog_start += 8 self.shell_start = self.prog_start log_proc.info("loaded binary: %s", self.bin_seg_list) for seg in self.bin_seg_list.segments: log_proc.info(seg) return True