From a6fc3f9762894cfb82a3f8f507d8df619ad51ab7 Mon Sep 17 00:00:00 2001 From: Ry Date: Mon, 25 Jul 2022 00:17:16 -0700 Subject: [PATCH] Don't add relative labels to FXF's reloc table --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index fe8fb26..ca116d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -89,8 +89,8 @@ fn perform_backpatching(targets: &Vec, address: (u32, bool)) { for target in targets { target.write(target.size, address.0); - // if this label isn't const, then add it to the reloc table for FXF - if !address.1 { + // if this label isn't const or relative, then add it to the reloc table for FXF + if !address.1 && !target.is_relative { let mut reloc_table = RELOC_ADDRESSES.lock().unwrap(); reloc_table.push(target.get_backpatch_location()); }