From 38410049473b6cca6570d50132edfb8ad41ddde3 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Mon, 10 Jun 2024 17:38:11 -0600 Subject: [PATCH] Fix writing empty v3 RELs Resolves #59 --- src/util/rel.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/rel.rs b/src/util/rel.rs index 2a18930..14fe23c 100644 --- a/src/util/rel.rs +++ b/src/util/rel.rs @@ -962,6 +962,9 @@ where &mut offset, )?; } + } else if info.version >= 3 { + // If we don't have relocations, still set fix_size. + header.fix_size = Some(offset); } for symbol in file.symbols().filter(|s| s.is_definition()) {