From cafa966be44cb7648a909f36a0c08c0eeebe3845 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Thu, 9 May 2013 18:58:52 +0400 Subject: [PATCH] Subtract the ASLR rebase delta in the export-dt-ini script. --- scripts/devel/export-dt-ini.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/devel/export-dt-ini.lua b/scripts/devel/export-dt-ini.lua index 54151577a..9c86ae46a 100644 --- a/scripts/devel/export-dt-ini.lua +++ b/scripts/devel/export-dt-ini.lua @@ -8,6 +8,7 @@ local ms = require 'memscan' local globals = df.global local global_addr = dfhack.internal.getAddress local os_type = dfhack.getOSType() +local rdelta = dfhack.internal.getRebaseDelta() local vbias = 0 if os_type == 'windows' then vbias = -4 end @@ -39,6 +40,7 @@ local function address(name,bias,base,field,...) if base == globals then addr = global_addr(field) + bias = bias - rdelta if addr and select('#',...) > 0 then _,addr = df.sizeof(ms.field_ref(base,field,...)) end