From: james.harris.1@gmail.com   
      
   On 04/07/2021 00:12, Branimir Maksimovic wrote:   
   > On 2021-07-03, James Harris wrote:   
      
   ...   
      
   >> That said, if I was writing the Linux code now I would look into how to   
   >> invoke the write system call via the write syscall function   
   >>   
   >> https://man7.org/linux/man-pages/man2/write.2.html   
   >>   
   >> and how to get it to be pulled in by dynamic linking.   
   >>   
   >>   
   > This is how looks modern assembler on GNU/Linux on an x86:   
   >   
   > ;-------------------------------------   
   > include 'format/format.inc'   
   >   
   > format ELF64 executable ELFOSABI_LINUX   
   > entry start   
   >   
   > include 'import64.inc'   
   >   
   > interpreter '/lib64/ld-linux-x86-64.so.2'   
   > needed 'libc.so.6'   
   > import printf,exit   
   >   
   > segment readable executable   
   >   
   > start:   
   >   
   > lea rdi,[msg]   
   > xor eax,eax   
   > call [printf]   
   >   
   > call [exit]   
   >   
   > segment readable writeable   
   > msg db 'Hello world!',0xA,0   
   > ;------------------------------------------   
      
   That looks good. Which assembler is it that supports all that stuff -   
   including the interpreter and needed statements?   
      
      
   --   
   James Harris   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|