Don't add relative labels to FXF's reloc table

This commit is contained in:
Ry 2022-07-25 00:17:16 -07:00
parent 9c79b3bba2
commit a6fc3f9762

View File

@ -89,8 +89,8 @@ fn perform_backpatching(targets: &Vec<BackpatchTarget>, address: (u32, bool)) {
for target in targets { for target in targets {
target.write(target.size, address.0); target.write(target.size, address.0);
// if this label isn't const, then add it to the reloc table for FXF // if this label isn't const or relative, then add it to the reloc table for FXF
if !address.1 { if !address.1 && !target.is_relative {
let mut reloc_table = RELOC_ADDRESSES.lock().unwrap(); let mut reloc_table = RELOC_ADDRESSES.lock().unwrap();
reloc_table.push(target.get_backpatch_location()); reloc_table.push(target.get_backpatch_location());
} }