':class:`bool`: Whether the current binary uses RELRO protections.
This requires both presence of the dynamic tag ``DT_BIND_NOW``, and
a ``GNU_RELRO`` program header.
The `ELF Specification`_ describes how the linker should resolve
symbols immediately, as soon as a binary is loaded.  This can be
emulated with the ``LD_BIND_NOW=1`` environment variable.
``DT_BIND_NOW``
If present in a shared object or executable, this entry instructs
the dynamic linker to process all relocations for the object
containing this entry before transferring control to the program.
The presence of this entry takes precedence over a directive to use
lazy binding for this object when specified through the environment
or via ``dlopen(BA_LIB)``.
(`page 81`_)
Separately, an extension to the GNU linker allows a binary to specify
a PT_GNU_RELRO_ program header, which describes the *region of memory
which is to be made read-only after relocations are complete.*
Finally, a new-ish extension which doesn\'t seem to have a canonical
source of documentation is DF_BIND_NOW_, which has supposedly superceded
``DT_BIND_NOW``.
``DF_BIND_NOW``
If set in a shared object or executable, this flag instructs the
dynamic linker to process all relocations for the object containing
this entry before transferring control to the program. The presence
of this entry takes precedence over a directive to use lazy binding
for this object when specified through the environment or via
``dlopen(BA_LIB)``.
.. _ELF Specification: https://refspecs.linuxbase.org/elf/elf.pdf
.. _page 81: https://refspecs.linuxbase.org/elf/elf.pdf#page=81
.. _DT_BIND_NOW: https://refspecs.linuxbase.org/elf/elf.pdf#page=81
.. _PT_GNU_RELRO: https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic.html#PROGHEADER
.. _DF_BIND_NOW: http://refspecs.linuxbase.org/elf/gabi4+/ch5.dynamic.html#df_bind_now
>>> path = pwnlib.data.elf.relro.path
>>> for test in glob(os.path.join(path, \'test-*\')):
...     e = ELF(test)
...     expected = os.path.basename(test).split(\'-\')[2]
...     actual = str(e.relro).lower()
...     assert actual == expected'

@property
def relro(self):

    if (not any((('GNU_RELRO' in str(s.header.p_type)) for s in self.segments))):
        return None
    if self.dynamic_by_tag('DT_BIND_NOW'):
        return 'Full'
    flags = self.dynamic_value_by_tag('DT_FLAGS')
    if (flags and (flags & constants.DF_BIND_NOW)):
        return 'Full'
    flags_1 = self.dynamic_value_by_tag('DT_FLAGS_1')
    if (flags_1 and (flags_1 & constants.DF_1_NOW)):
        return 'Full'
    return 'Partial'
