From 6a9dea943c078876061eda0f6203647b0c5aadd4 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Thu, 30 Apr 2026 10:34:23 +0200 Subject: Add a new 'check' stage in assemble() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is actually an expansion from asan(), but it also checks for stuff that goes outside of the realm of address sanitation. In this aspect, asan() has been integrated inside of the new check() function. Signed-off-by: Miquel Sabaté Solà --- lib/xixanta/src/object.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/xixanta/src/object.rs') diff --git a/lib/xixanta/src/object.rs b/lib/xixanta/src/object.rs index a05c315..8867af3 100644 --- a/lib/xixanta/src/object.rs +++ b/lib/xixanta/src/object.rs @@ -260,14 +260,10 @@ impl Context { var.accessed += 1; Ok(var.clone()) } - // If it's a raw address, then we return the resolved value. - ObjectType::Address => { - let var_to_resolve = var.clone(); - Ok(self.resolve_label(mappings, &var_to_resolve)?) - } - // If it's a .proc, then we account for the number of times - // it was accessed, and we return the resolved value. - ObjectType::Proc => { + // If it's a .proc or a raw address, then we account for the + // number of times it was accessed, and we return the + // resolved value. + ObjectType::Address | ObjectType::Proc => { var.accessed += 1; let var_to_resolve = var.clone(); Ok(self.resolve_label(mappings, &var_to_resolve)?) -- cgit v1.2.3