def _executable_memory_regions(self, objects=None, force_segment=False):
        if objects is None:
            binaries = self.project.loader.all_objects
        else:
            binaries = objects
        memory_regions = [ ]
        for b in binaries:
            if isinstance(b, ELF):
                if not force_segment and b.sections:
                    for section in b.sections:
                        if section.is_executable:
                            tpl = (section.min_addr, section.max_addr)
                            memory_regions.append(tpl)
                else:
                    for segment in b.segments:
                        if segment.is_executable:
                            tpl = (segment.min_addr, segment.max_addr)
                            memory_regions.append(tpl)
            elif isinstance(b, PE):
                for section in b.sections:
                    if section.is_executable:
                        tpl = (section.min_addr, section.max_addr)
                        memory_regions.append(tpl)
            elif isinstance(b, MachO):
                if b.segments:
                    for seg in b.segments:
                        if seg.is_executable:
                            for section in seg.sections:
                                tpl = (section.min_addr, section.max_addr)
                                memory_regions.append(tpl)
            elif isinstance(b, Blob):
                tpl = (b.min_addr, b.max_addr)
                memory_regions.append(tpl)
            elif isinstance(b, self._cle_pseudo_objects):
                pass
            else:
                l.warning('Unsupported object format "%s". Treat it as an executable.', b.__class__.__name__)
                tpl = (b.min_addr, b.max_addr)
                memory_regions.append(tpl)
        if not memory_regions:
            memory_regions = [(start, start + len(backer)) for start, backer in self.project.loader.memory.backers()]
        memory_regions = sorted(memory_regions, key=lambda x: x[0])
        return memory_regions