def post_build_setup(self): if not self.post_build_setup_done: self.post_build_setup_done = True (lo, hi) = pure_utils.get_min_max_pcs(Main.cc, self.elf) if self.minpc < 0: self.minpc = lo if self.maxpc < 0: self.maxpc = hi if self.entrypoint < 0: self.entrypoint = pure_utils.get_entrypoint(Main.cc, self.elf) if self.image_size < 0: self.image_size = pure_utils.get_image_size(self.image) if type(self.exitpc) == str: stage = self.object_config_lookup("Bootstages", self.exitpc) if not stage.post_build_setup_done: stage.post_build_setup() self.exitpc = stage.entrypoint
def post_build_setup(self, root): if not self.post_build_setup_done: self.post_build_setup_done = True image = os.path.join(root, self.image) elf = os.path.join(root, self.elf) (lo, hi) = pure_utils.get_min_max_pcs(elf) if self.minpc < 0: self.minpc = lo if self.maxpc < 0: self.maxpc = hi if self.entrypoint < 0: self.entrypoint = pure_utils.get_entrypoint(elf) if self.image_size < 0: self.image_size = pure_utils.get_image_size(self.image) if type(self.exitpc) == str: stage = self.object_config_lookup("TargetStage", self.exitpc) if not stage.post_build_setup_done: stage.post_build_setup(root) self.exitpc = stage.entrypoint
def __init__(self, elf): self.elf = elf self.entrypoint = pure_utils.get_entrypoint(elf) self.exitpc = -1 self.stagename = "local"