Well, if you want to make a system call "easily" to simply send a string to stdout, you will want to bounce via libc for the actual syscall. As openbsd is right now, you can't just put a value in a register and hop off to make system calls, which incidentally is what some buffer overflow or ROP payload would like to do, given half a chance.
Den fre 14 mars 2025 kl 20:22 skrev Stephen Wiley <swi...@swiley.net>: > > If you do that it will just tell you to link call libc. Which works > and is probably a good idea but might not be what he's looking for. > > --Stephen > > On Fri, Mar 14, 2025 at 03:06:17PM +0000, jbra...@dismail.de wrote: > > March 14, 2025 at 10:08 AM, "Otto Moerbeek" <o...@drijf.net > > mailto:o...@drijf.net?to=%22Otto%20Moerbeek%22%20%3Cotto%40drijf.net%3E > > > wrote: > > > > > > > > > > > > On Fri, Mar 14, 2025 at 12:50:27PM +0000, jbra...@dismail.de wrote: > > > > > > > > > > > March 14, 2025 at 5:41 AM, "Computer Planet" <open...@cpnetserver.net > > > > mailto:open...@cpnetserver.net?to=%22Computer%20Planet%22%20%3Copenbsd%40cpnetserver.net%3E > > > > > wrote: > > > > > > > > > > > > > > > > > > > > Hi guys! > > > > Please, could someone tell me how to print a very simple "Hello, > > > > world!" in assembly for aarch64? > > > > Thanks for reply. > > > > > > > > > > > > https://peterdn.com/post/2020/08/22/hello-world-in-arm64-assembly/ > > > > > > > This won't work. OpenBSD uses a different ABI than Linux. > > > > > > -Otto > > > > > > Hmm, doesn't gcc/llvm have a command line flag to take a C file and output > > assembly? > > > > Maybe they could take the minimal hello.c file from that blog and run > > > > gcc --output-this-c-file-to-assembly hello.c > > > > ? > > > -- May the most significant bit of your life be positive.