Message board for the users of flat assembler.
> Unix > fasm port for OpenBSD amd64
Gibson 03 Feb 2021, 21:15
Based on the Linux x64 port, I've ported fasm to OpenBSD on amd64 (i386 is available in packages and as devel/fasm in ports). The libc port could not be used here as OpenBSD does not support i386 binaries on amd64.
The attached archive contains the source and the binary, so it can be self-compiled natively. Some things are marked as TODO in the source, and the code could do with improvements in places, but it does work.
You must link native executables using ld.bfd -nopie, the normal linker will not work due to how it treats the .note.openbsd.ident section when it isn't marked explicitly as a note (fasm does not support that attribute for ELF).
At a minimum, you need this to assemble a working native executable:
format ELF64 section '.note.openbsd.ident' align 2 dd 8,4,1 db 'OpenBSD',0 dd 0 public _start _start: mov rdi,0 mov rax,1 ; SYS_exit syscall
|03 Feb 2021, 21:15||
andurilan 06 Dec 2021, 11:43
You've just injected new life into my stale Bitrig installation.
|06 Dec 2021, 11:43||
< Last Thread | Next Thread >
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.