home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.development      Operating system development chatter      4,255 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,124 of 4,255   
   Paul Edwards to Paul Edwards   
   Re: flexible linux ELF   
   17 Feb 24 07:52:49   
   
   From: mutazilah@gmail.com   
      
   On 30/01/24 04:16, Paul Edwards wrote:   
      
   > So sticking with 32-bit for now, there are two types   
   > of ELF executables:   
   >   
   > 1. Does INT 80H   
      
   > So my question is - can someone suggest some ELF startup   
   > code design that would work on both standard Linux and   
   > PDOS-generic (type 2) and possibly PDOS/386 (type 1 - but   
   > this is less possible and less important).   
      
   So I have an answer to this now:   
      
   you can use the getpid() syscall to get the process ID, then open and   
   read /proc//cmdline   
      
   Apparently this method exists in Unix too.   
      
   So that relieves the burden on the stack   
   format. It does mean that the OS needs to   
   recognize the special open of "/proc", but   
   that's fine - that will be easier to implement   
   in standard C code.   
      
   BFN. Paul.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca