Stream: cranelift

Topic: pulley32 Reloc Abs8 vs Abs4


view this post on Zulip Firestar99 (Jul 08 2026 at 15:46):

Inst::LoadExtNameFar { dst, name, offset } => {
    let size = match P::pointer_width() {
        PointerWidth::PointerWidth32 => {
            enc::xconst32(sink, dst, 0);
            4
        }
        PointerWidth::PointerWidth64 => {
            enc::xconst64(sink, dst, 0);
            8
        }
    };
    let end = sink.cur_offset();
    sink.add_reloc_at_offset(end - size, Reloc::Abs8, &**name, *offset);
    //                                   ^^^^^^^^^^^^
}

source

I know pulley32 isn't really supported, but shouldn't the Reloc for 32bit pointer width be Abs4, not Abs8? (Just ran across this while researching jump label patching and relocs)

view this post on Zulip fitzgen (he/him) (Jul 09 2026 at 22:27):

Yes, this indeed looks like a bug, would be happy to review a PR fixing it!

Firestar99 said:

I know pulley32 isn't really supported

it isn't tier 1, but it is indeed a supported target for Wasmtime

view this post on Zulip Firestar99 (Jul 10 2026 at 09:18):

https://github.com/bytecodealliance/wasmtime/pull/13858


Last updated: Jul 29 2026 at 05:03 UTC