Skip to content

Commit c8f6aae

Browse files
committed
Use DT_PLTRELSZ if present
1 parent f0d0bb2 commit c8f6aae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cle/backends/elf/elf.py

+2
Original file line numberDiff line numberDiff line change
@@ -987,6 +987,8 @@ def __register_dyn(self, seg_readelf):
987987
rela_tag = "DT_" + self.rela_type
988988
relsz_tag = rela_tag + "SZ"
989989
if rela_tag in self._dynamic:
990+
if "DT_PLTRELSZ" in self._dynamic:
991+
relsz_tag = "DT_PLTRELSZ"
990992
reloffset = AT.from_lva(self._dynamic[rela_tag], self).to_rva()
991993
if relsz_tag not in self._dynamic:
992994
raise CLEInvalidBinaryError(f"Dynamic section contains {rela_tag} but not {relsz_tag}")

0 commit comments

Comments
 (0)