@staticmethod
def _extract_section(sect_req, elffile, mem=None):
    """
            :sect_req dictionary of section names as strings and SectionRequest objects
            :mem if mem is not null, it serves as an accumulator rather than using the memory
                 in SectionRequests

            :returns nothing
        """
    for nseg, section in enumerate(elffile.iter_sections()):
        request = sect_req.get(section.name, None)
        if request:
            request.set_found(True)
            request.set_sect_properties(section.header.sh_addr, section.
                header.sh_size)
            if mem:
                mem.add_vma(section.header.sh_addr, section.data())
            else:
                request.memory.add_vma(section.header.sh_addr, section.data())
