Skip to content

Commit

Permalink
Use DT_PLTRELSZ if present
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmot authored and ltfish committed May 23, 2024
1 parent 189baf7 commit b0287ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cle/backends/elf/elf.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,8 @@ def __register_dyn(self, seg_readelf):
rela_tag = "DT_" + self.rela_type
relsz_tag = rela_tag + "SZ"
if rela_tag in self._dynamic:
if "DT_PLTRELSZ" in self._dynamic:
relsz_tag = "DT_PLTRELSZ"
reloffset = AT.from_lva(self._dynamic[rela_tag], self).to_rva()
if relsz_tag not in self._dynamic:
raise CLEInvalidBinaryError(f"Dynamic section contains {rela_tag} but not {relsz_tag}")
Expand Down

0 comments on commit b0287ab

Please sign in to comment.