Hello,

I've attached a debdiff fixing this.

Best regards,
Simon Quigley
[email protected]
diff -Nru rust-wasmtime-36.0.20+dfsg/debian/changelog 
rust-wasmtime-36.0.20+dfsg/debian/changelog
--- rust-wasmtime-36.0.20+dfsg/debian/changelog 2026-10-30 08:10:55.000000000 
-0500
+++ rust-wasmtime-36.0.20+dfsg/debian/changelog 2026-11-28 17:53:49.000000000 
-0600
@@ -1,3 +1,10 @@
+rust-wasmtime (36.0.20+dfsg-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Build against object 0.41.
+
+ -- Simon Quigley <[email protected]>  Sat, 28 Nov 2026 17:54:16 -0600
+
 rust-wasmtime (36.0.20+dfsg-1) unstable; urgency=high
 
   [ upstream ]
diff -Nru rust-wasmtime-36.0.20+dfsg/debian/control 
rust-wasmtime-36.0.20+dfsg/debian/control
--- rust-wasmtime-36.0.20+dfsg/debian/control   2026-10-30 08:09:52.000000000 
-0500
+++ rust-wasmtime-36.0.20+dfsg/debian/control   2026-11-28 17:53:40.000000000 
-0600
@@ -34,7 +34,7 @@
  librust-log-0.4-dev,
  librust-memfd-0.6-dev,
  librust-memmap2-0.9-dev,
- librust-object-0.37-dev,
+ librust-object-0.41-dev,
  librust-paste-1-dev,
  librust-postcard-1-dev,
  librust-pretty-env-logger-0.5-dev,
@@ -91,7 +91,7 @@
  librust-libm-0.2-dev,
  librust-log-0.4-dev,
  librust-memmap2-0.9-dev,
- librust-object-0.37-dev,
+ librust-object-0.41-dev,
  librust-postcard-1-dev,
  librust-proc-macro2-1-dev,
  librust-quote-1-dev,
diff -Nru rust-wasmtime-36.0.20+dfsg/debian/patches/1002_newer_object.patch 
rust-wasmtime-36.0.20+dfsg/debian/patches/1002_newer_object.patch
--- rust-wasmtime-36.0.20+dfsg/debian/patches/1002_newer_object.patch   
1969-12-31 18:00:00.000000000 -0600
+++ rust-wasmtime-36.0.20+dfsg/debian/patches/1002_newer_object.patch   
2026-11-28 17:53:22.000000000 -0600
@@ -0,0 +1,245 @@
+Description: Build against object 0.41.
+Author: Simon Quigley <[email protected]>
+Origin: vendor
+Forwarded: not-needed
+Last-Update: 2026-11-28
+---
+--- a/Cargo.toml
++++ b/Cargo.toml
+@@ -273,7 +273,7 @@ json-from-wast = "0.239.0"
+ arbitrary = "1.4.0"
+ mutatis = "0.3.2"
+ cc = "1.0"
+-object = { version = "0.37.0", default-features = false, features = 
['read_core', 'elf'] }
++object = { version = "0.41.0", default-features = false, features = 
['read_core', 'elf'] }
+ gimli = { version = "0.32.0", default-features = false, features = ['read'] }
+ addr2line = { version = "0.25.0", default-features = false }
+ anyhow = { version = "1.0.93", default-features = false }
+--- a/cranelift/object/src/backend.rs
++++ b/cranelift/object/src/backend.rs
+@@ -455,39 +455,30 @@ impl Module for ObjectModule {
+         if used {
+             match self.object.format() {
+                 object::BinaryFormat::Elf => {
+-                    let section = self.object.section_mut(section);
+-                    match &mut section.flags {
+-                        SectionFlags::None => {
+-                            // Explicitly specify default flags as 
SectionFlags::Elf overwrites them
+-                            let sh_flags = if decl.tls {
+-                                elf::SHF_ALLOC | elf::SHF_WRITE | elf::SHF_TLS
+-                            } else if decl.writable || !relocs.is_empty() {
+-                                elf::SHF_ALLOC | elf::SHF_WRITE
+-                            } else {
+-                                elf::SHF_ALLOC
+-                            };
+-                            section.flags = SectionFlags::Elf {
+-                                sh_flags: u64::from(sh_flags | 
elf::SHF_GNU_RETAIN),
+-                            }
+-                        }
+-                        SectionFlags::Elf { sh_flags } => {
+-                            *sh_flags |= u64::from(elf::SHF_GNU_RETAIN)
+-                        }
+-                        _ => unreachable!(),
+-                    }
++                    let SectionFlags::Elf { sh_flags, .. } =
++                        self.object.section_flags_mut(section)
++                    else {
++                        unreachable!();
++                    };
++                    let extra = if decl.tls {
++                        elf::SHF_ALLOC | elf::SHF_WRITE | elf::SHF_TLS
++                    } else if decl.writable || !relocs.is_empty() {
++                        elf::SHF_ALLOC | elf::SHF_WRITE
++                    } else {
++                        elf::SHF_ALLOC
++                    };
++                    *sh_flags |= extra | elf::SHF_GNU_RETAIN;
+                 }
+                 object::BinaryFormat::Coff => {}
+                 object::BinaryFormat::MachO => {
+-                    let symbol = self.object.symbol_mut(symbol);
+-                    assert!(matches!(symbol.flags, SymbolFlags::None));
+-                    let n_desc = if decl.linkage == Linkage::Preemptible {
+-                        object::macho::N_WEAK_DEF
+-                    } else {
+-                        0
++                    let SymbolFlags::MachO { n_desc, .. } = 
self.object.symbol_flags_mut(symbol)
++                    else {
++                        unreachable!();
+                     };
+-                    symbol.flags = SymbolFlags::MachO {
+-                        n_desc: n_desc | object::macho::N_NO_DEAD_STRIP,
++                    if decl.linkage == Linkage::Preemptible {
++                        *n_desc |= object::macho::N_WEAK_DEF;
+                     }
++                    *n_desc |= object::macho::N_NO_DEAD_STRIP;
+                 }
+                 _ => unreachable!(),
+             }
+--- a/crates/cranelift/src/obj.rs
++++ b/crates/cranelift/src/obj.rs
+@@ -89,11 +89,10 @@ impl<'a> ModuleTextBuilder<'a> {
+         // try to call `Mmap::make_executable`, which makes Pulley more
+         // portable.
+         if compiler.triple().is_pulley() {
+-            let section = obj.section_mut(text_section);
+-            assert!(matches!(section.flags, SectionFlags::None));
+-            section.flags = SectionFlags::Elf {
+-                sh_flags: obj::SH_WASMTIME_NOT_EXECUTED,
++            let SectionFlags::Elf { sh_flags, .. } = 
obj.section_flags_mut(text_section) else {
++                unreachable!();
+             };
++            *sh_flags = 
object::elf::SectionFlags(obj::SH_WASMTIME_NOT_EXECUTED);
+         }
+ 
+         Self {
+--- a/crates/environ/src/compile/mod.rs
++++ b/crates/environ/src/compile/mod.rs
+@@ -384,12 +384,14 @@ pub trait Compiler: Send + Sync {
+             },
+         );
+         obj.flags = FileFlags::Elf {
+-            os_abi: obj::ELFOSABI_WASMTIME,
+-            e_flags: flags
+-                | match kind {
+-                    ObjectKind::Module => obj::EF_WASMTIME_MODULE,
+-                    ObjectKind::Component => obj::EF_WASMTIME_COMPONENT,
+-                },
++            os_abi: object::elf::OsAbi(obj::ELFOSABI_WASMTIME),
++            e_flags: object::elf::FileFlags(
++                flags
++                    | match kind {
++                        ObjectKind::Module => obj::EF_WASMTIME_MODULE,
++                        ObjectKind::Component => obj::EF_WASMTIME_COMPONENT,
++                    },
++            ),
+             abi_version: 0,
+         };
+         Ok(obj)
+--- a/crates/environ/src/compile/module_artifacts.rs
++++ b/crates/environ/src/compile/module_artifacts.rs
+@@ -292,22 +292,14 @@ impl FinishedObject for Vec<u8> {
+         struct ObjectVec(Vec<u8>);
+ 
+         impl WritableBuffer for ObjectVec {
+-            fn len(&self) -> usize {
+-                self.0.len()
+-            }
+-
+-            fn reserve(&mut self, additional: usize) -> Result<(), ()> {
++            fn reserve(&mut self, additional: u64) -> Result<(), ()> {
+                 assert_eq!(self.0.len(), 0, "cannot reserve twice");
+-                self.0 = Vec::with_capacity(additional);
++                self.0 = Vec::with_capacity(additional as usize);
+                 Ok(())
+             }
+ 
+-            fn resize(&mut self, new_len: usize) {
+-                if new_len <= self.0.len() {
+-                    self.0.truncate(new_len)
+-                } else {
+-                    self.0.extend(vec![0; new_len - self.0.len()])
+-                }
++            fn write_zeros(&mut self, additional: u64) {
++                self.0.extend(vec![0; additional as usize])
+             }
+ 
+             fn write_bytes(&mut self, val: &[u8]) {
+--- a/crates/wasmtime/src/compile/runtime.rs
++++ b/crates/wasmtime/src/compile/runtime.rs
+@@ -167,13 +167,12 @@ impl FinishedObject for MmapVecWrapper {
+         }
+ 
+         impl WritableBuffer for ObjectMmap {
+-            fn len(&self) -> usize {
+-                self.len
+-            }
+-
+-            fn reserve(&mut self, additional: usize) -> Result<(), ()> {
++            fn reserve(&mut self, additional: u64) -> Result<(), ()> {
+                 assert!(self.mmap.is_none(), "cannot reserve twice");
+-                self.mmap = match 
MmapVec::with_capacity_and_alignment(additional, self.alignment) {
++                self.mmap = match MmapVec::with_capacity_and_alignment(
++                    additional as usize,
++                    self.alignment,
++                ) {
+                     Ok(mmap) => Some(mmap),
+                     Err(e) => {
+                         self.err = Some(e);
+@@ -183,14 +182,9 @@ impl FinishedObject for MmapVecWrapper {
+                 Ok(())
+             }
+ 
+-            fn resize(&mut self, new_len: usize) {
+-                // Resizing always appends 0 bytes and since new mmaps start 
out as 0
+-                // bytes we don't actually need to do anything as part of 
this other
+-                // than update our own length.
+-                if new_len <= self.len {
+-                    return;
+-                }
+-                self.len = new_len;
++            fn write_zeros(&mut self, additional: u64) {
++                // New mmaps start out as zeros, so only the length moves.
++                self.len += additional as usize;
+             }
+ 
+             fn write_bytes(&mut self, val: &[u8]) {
+--- a/crates/wasmtime/src/engine/serialization.rs
++++ b/crates/wasmtime/src/engine/serialization.rs
+@@ -66,10 +66,10 @@ pub fn check_compatible(engine: &Engine,
+     };
+     match obj.flags() {
+         FileFlags::Elf {
+-            os_abi: obj::ELFOSABI_WASMTIME,
++            os_abi: object::elf::OsAbi(obj::ELFOSABI_WASMTIME),
+             abi_version: 0,
+             e_flags,
+-        } if e_flags & expected_e_flags == expected_e_flags => {}
++        } if e_flags.0 & expected_e_flags == expected_e_flags => {}
+         _ => bail!("incompatible object file format"),
+     }
+ 
+@@ -148,15 +148,15 @@ fn detect_precompiled<'data, R: object::
+ ) -> Option<Precompiled> {
+     match obj.flags() {
+         FileFlags::Elf {
+-            os_abi: obj::ELFOSABI_WASMTIME,
++            os_abi: object::elf::OsAbi(obj::ELFOSABI_WASMTIME),
+             abi_version: 0,
+             e_flags,
+-        } if e_flags & obj::EF_WASMTIME_MODULE != 0 => 
Some(Precompiled::Module),
++        } if e_flags.0 & obj::EF_WASMTIME_MODULE != 0 => 
Some(Precompiled::Module),
+         FileFlags::Elf {
+-            os_abi: obj::ELFOSABI_WASMTIME,
++            os_abi: object::elf::OsAbi(obj::ELFOSABI_WASMTIME),
+             abi_version: 0,
+             e_flags,
+-        } if e_flags & obj::EF_WASMTIME_COMPONENT != 0 => 
Some(Precompiled::Component),
++        } if e_flags.0 & obj::EF_WASMTIME_COMPONENT != 0 => 
Some(Precompiled::Component),
+         _ => None,
+     }
+ }
+--- a/crates/wasmtime/src/runtime/code_memory.rs
++++ b/crates/wasmtime/src/runtime/code_memory.rs
+@@ -149,8 +149,8 @@ impl CodeMemory {
+                 ".text" => {
+                     text = range;
+ 
+-                    if let SectionFlags::Elf { sh_flags } = section.flags() {
+-                        if sh_flags & obj::SH_WASMTIME_NOT_EXECUTED != 0 {
++                    if let SectionFlags::Elf { sh_flags, .. } = 
section.flags() {
++                        if sh_flags.0 & obj::SH_WASMTIME_NOT_EXECUTED != 0 {
+                             needs_executable = false;
+                         }
+                     }
+--- a/src/commands/objdump.rs
++++ b/src/commands/objdump.rs
+@@ -348,7 +348,7 @@ impl ObjdumpCommand {
+                     FileFlags::Elf { e_flags, .. } => e_flags,
+                     _ => bail!("not an ELF file"),
+                 };
+-                if e_flags & (obj::EF_WASMTIME_PULLEY32 | 
obj::EF_WASMTIME_PULLEY64) != 0 {
++                if e_flags.0 & (obj::EF_WASMTIME_PULLEY32 | 
obj::EF_WASMTIME_PULLEY64) != 0 {
+                     return self.disas_pulley(func, addr);
+                 } else {
+                     "riscv64"
diff -Nru rust-wasmtime-36.0.20+dfsg/debian/patches/series 
rust-wasmtime-36.0.20+dfsg/debian/patches/series
--- rust-wasmtime-36.0.20+dfsg/debian/patches/series    2026-10-30 
08:10:55.000000000 -0500
+++ rust-wasmtime-36.0.20+dfsg/debian/patches/series    2026-11-28 
17:53:31.000000000 -0600
@@ -23,3 +23,4 @@
 2003_avoid_wit-bindgen.patch
 2005_deb-built-using.patch
 2006_broken_tests.patch
+1002_newer_object.patch

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to