Cross-compiling a .elf file for RISCV

I’m trying to build a free-standing RISCV .elf file, not sure what to do.

odin build free.odin -file -build-mode:obj -target:freestanding_riscv64

This outputs a .obj, but I assume the header tables aren’t included?

I am not sure what you mean with a .elf file, I am assuming you mean just a riscv elf executable?

If so, have a look at the PR adding riscv support, it outlines cross-compilation and emulation: add support for linux_riscv64 and freestanding_riscv64 by laytan · Pull Request #4089 · odin-lang/Odin · GitHub

To clarify yes I mean a riscv elf executable. Sounds like I just need to link it myself after compilation.