Automagic: Do some slight gymnastics to get the true value of the pointer

This commit is contained in:
Mike Auty
2024-05-21 23:13:31 +01:00
parent c5a45f91fc
commit 08493e9c3a
+4 -1
View File
@@ -159,7 +159,10 @@ class LinuxIntelStacker(interfaces.automagic.StackerLayerInterface):
# This we get for free
aslr_shift = (
init_task.files.cast("pointer")
int.from_bytes(
init_task.files.cast("bytes", length=init_task.files.vol.size),
byteorder=init_task.files.vol.data_format.byteorder,
)
- module.get_symbol("init_files").address
)
kaslr_shift = init_task_address - cls.virtual_to_physical_address(