aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mssola@mssola.com>2026-04-30 12:45:12 +0200
committerMiquel Sabaté Solà <mssola@mssola.com>2026-04-30 12:45:38 +0200
commit2b794d4fc67178ecc2ef62de8d6ba3bc690d34ac (patch)
tree9ffa1fb41c56c51e06b34cb018c1d46d2f750afb /lib
parent4fa306e9011978cc374f6ab402ccb3602176d4ba (diff)
downloadtools.nes-2b794d4fc67178ecc2ef62de8d6ba3bc690d34ac.tar.gz
tools.nes-2b794d4fc67178ecc2ef62de8d6ba3bc690d34ac.zip
Don't do the 'accessed' check if "check:ignore" was given
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/xixanta/src/assembler.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/xixanta/src/assembler.rs b/lib/xixanta/src/assembler.rs
index 47c662b..b01777c 100644
--- a/lib/xixanta/src/assembler.rs
+++ b/lib/xixanta/src/assembler.rs
@@ -1183,8 +1183,11 @@ impl<'a> Assembler<'a> {
format!("{context_name}::{name}")
};
- // Check if this variable/proc was ever accessed.
- if !self.allow_unused && bundle.accessed == 0 {
+ // Check if this variable/proc was ever accessed. This check is
+ // performed unless the user explicitely told us not to do it
+ // (e.g. nasm's '--allow-unused' flag), or the magic
+ // 'asan:ignore' comment is given.
+ if !self.allow_unused && !bundle.asan_ignore && bundle.accessed == 0 {
// If this was a .proc definition then we are certain that
// this is dead code, which is a really crappy situation.
if matches!(bundle.object_type, ObjectType::Proc) {