'dynamic_by_tag(tag) -> tag
Arguments:
tag(str): Named ``DT_XXX`` tag (e.g. ``\'DT_STRTAB\'``).
Returns:
:class:`elftools.elf.dynamic.DynamicTag`'

def dynamic_by_tag(self, tag):

    dt = None
    dynamic = self.get_section_by_name('.dynamic')
    if (not dynamic):
        return None
    try:
        dt = next((t for t in dynamic.iter_tags() if (tag == t.entry.d_tag)))
    except StopIteration:
        pass
    return dt
