flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
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). Notes:
At a minimum, you need this to assemble a working native executable: Code: 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 Have fun!
|
|||||||||||
![]() |
|
andurilan 06 Dec 2021, 11:43
You've just injected new life into my stale Bitrig installation.
Good job! _________________ AA |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.