From 024f86d4bcee3a7b0ee9c20331d695ab1922fd5a Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 27 Jan 2026 13:52:33 +0100 Subject: [PATCH] size attribute added to symbol class --- src/pelfy/_main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pelfy/_main.py b/src/pelfy/_main.py index 206a2aa..1bf7291 100644 --- a/src/pelfy/_main.py +++ b/src/pelfy/_main.py @@ -42,6 +42,7 @@ class elf_symbol(): offset_in_section: Position of first symbol byte relative to section start offset_in_file: Position of first symbol byte in object file + size: size of symbol in bytes fields: All symbol header fields as dict """ @@ -71,6 +72,7 @@ class elf_symbol(): self.thumb_mode = bool((file.architecture == 'EM_ARM') & fields['st_value'] & 1) self.offset_in_section = fields['st_value'] & ~int(self.thumb_mode) self.offset_in_file = self.section['sh_offset'] + self.offset_in_section if self.section else 0 + self.size = self.fields['st_size'] @property def data(self) -> bytes: